diff --git a/data/fields_default.xml b/data/fields_default.xml index 73d9d14..cf65854 100755 --- a/data/fields_default.xml +++ b/data/fields_default.xml @@ -374,6 +374,7 @@ ctx = { "amount_untaxed": self.amount_untaxed, "amount_tax": self.amount_tax, "amount_total": self.amount_total, + "currency_symbol": self.currency_id.symbol, "terms_and_conditions": self.note, # "payment_part_one": self.payment_part_one, @@ -595,6 +596,15 @@ action = ctx 4 + + Currency symbol + currency_symbol + + Symbol for used currency, for displaying in documents + + 4 + + Terms and conditions terms_and_conditions diff --git a/wizard/res_partner_contract_wizard.py b/wizard/res_partner_contract_wizard.py index 4e1e286..537aadb 100755 --- a/wizard/res_partner_contract_wizard.py +++ b/wizard/res_partner_contract_wizard.py @@ -229,7 +229,6 @@ class ContractWizard(models.TransientModel): or hasattr(self.target, "order_id") and self.target.order_id.order_line ): - def number_generator(n=1): while True: yield n @@ -245,18 +244,16 @@ class ContractWizard(models.TransientModel): { "products": [ { - "number": next(counter), - "vendor_code": item.product_id.default_code, + "number": next(counter) if not item.display_type else "", + "vendor_code": item.product_id.default_code or "", "label": item.product_id.display_name, "description": item.name, - # "uom": item.product_id.uom_po_id.name, "count": item.product_uom_qty, "unit": item.product_uom.name, - "cost": self.to_fixed(item.price_unit), - "cost_wo_vat": self.to_fixed(item.price_reduce_taxexcl), - "discount": self.to_fixed(item.discount), - "subtotal": self.to_fixed(item.price_subtotal), - "currency_symbol": item.currency_id.symbol, + "cost": item.price_unit, + "cost_wo_vat": item.price_reduce_taxexcl, + "discount": item.discount, + "subtotal": item.price_subtotal, "display_type": item.display_type, } for item in sale_order_rec.order_line or [] diff --git a/Шаблон_КП.docx b/Шаблон_КП.docx index e772092..f8fac76 100644 Binary files a/Шаблон_КП.docx and b/Шаблон_КП.docx differ