diff options
| author | stephanchrst <stephanchrst@gmail.com> | 2024-08-14 10:40:12 +0700 |
|---|---|---|
| committer | stephanchrst <stephanchrst@gmail.com> | 2024-08-14 10:40:12 +0700 |
| commit | 1845bfdd4e3bd693d691e505b3dc398c028b7e1b (patch) | |
| tree | 6dd97c56e56beedf6960bd1ee0d84c54ea31e283 | |
| parent | 2788396b4b1ccbb83c287f9bba0d52e7799f7b38 (diff) | |
another checkpoint
| -rwxr-xr-x | indoteknik_custom/models/sale_order.py | 6 | ||||
| -rwxr-xr-x | indoteknik_custom/views/sale_order.xml | 10 |
2 files changed, 8 insertions, 8 deletions
diff --git a/indoteknik_custom/models/sale_order.py b/indoteknik_custom/models/sale_order.py index 0be40fd0..e71b8ce4 100755 --- a/indoteknik_custom/models/sale_order.py +++ b/indoteknik_custom/models/sale_order.py @@ -837,8 +837,8 @@ class SaleOrder(models.Model): def calculate_selling_price(self): # TODO ongkos kirim, biaya pihak ketiga calculate @stephan # TODO voucher @stephan - # TODO vendor hilanging child di field SO Line @stephan - # TODO button pindahin @stephan + # vendor hilangin child di field SO Line @stephan + # button pindahin @stephan # TODO last so 1 tahun ke belakang @stephan # TODO pastikan harga beli 1 tahun ke belakang jg # TODO counter di klik berapa banyak @@ -890,7 +890,7 @@ class SaleOrder(models.Model): tax_id = last_so.tax_id for tax in tax_id: if tax.price_include: - selling_price = selling_price + (selling_price * 11 / 100) + selling_price = selling_price + (selling_price*11/100) else: selling_price = selling_price discount = 0 diff --git a/indoteknik_custom/views/sale_order.xml b/indoteknik_custom/views/sale_order.xml index c13026ed..1257ff85 100755 --- a/indoteknik_custom/views/sale_order.xml +++ b/indoteknik_custom/views/sale_order.xml @@ -43,6 +43,10 @@ attrs="{'invisible': ['|', ('applied_voucher_id', '=', False), ('state', 'not in', ['draft','sent'])]}" /> </div> + <button name="calculate_selling_price" + string="Calculate Selling Price" + type="object" + /> </field> <field name="source_id" position="attributes"> <attribute name="invisible">1</attribute> @@ -66,10 +70,6 @@ string="Override Create Invoice" type="object" /> - <button name="calculate_selling_price" - string="Calculate Selling Price" - type="object" - /> </field> <field name="partner_shipping_id" position="after"> <field name="real_shipping_id"/> @@ -100,7 +100,7 @@ </attribute> </xpath> <xpath expr="//form/sheet/notebook/page/field[@name='order_line']/tree/field[@name='price_total']" position="after"> - <field name="vendor_id" attrs="{'readonly': [('parent.approval_status', '=', 'approved')]}"/> + <field name="vendor_id" attrs="{'readonly': [('parent.approval_status', '=', 'approved')]}" domain="[('parent_id', '=', False)]"/> <field name="purchase_price" attrs=" { 'readonly': [ |
