diff --git a/addons/account/models/account_move.py b/addons/account/models/account_move.py index 4e79ea2bda8..a3002fa1f8c 100644 --- a/addons/account/models/account_move.py +++ b/addons/account/models/account_move.py @@ -1364,6 +1364,8 @@ class AccountMove(models.Model): line.account_id = self.journal_id.default_credit_account_id elif self.is_purchase_document(include_receipts=True): line.account_id = self.journal_id.default_debit_account_id + if line.product_id and not line._cache.get('name'): + line.name = line._get_computed_name() self.line_ids._onchange_price_subtotal() self._recompute_dynamic_lines(recompute_all_taxes=True) diff --git a/addons/l10n_generic_coa/demo/account_invoice_demo.xml b/addons/l10n_generic_coa/demo/account_invoice_demo.xml index 5a41ec2060c..c1aabfd3fb1 100644 --- a/addons/l10n_generic_coa/demo/account_invoice_demo.xml +++ b/addons/l10n_generic_coa/demo/account_invoice_demo.xml @@ -1,7 +1,7 @@ - + out_invoice @@ -50,7 +50,7 @@ - + in_invoice @@ -63,43 +63,24 @@ - - binary - - in_invoice_yourcompany_demo.pdf - account.move - in_invoice - - - - - - - - - account.move - - Vendor Bill attachment - comment - - - in_invoice - - + INV/2018/0057 + + 2018-09-17 + + + + binary + + out_invoice_yourcompany_demo.pdf + account.move + + + + + + + + + account.move + + Customer Invoice attachment + comment + + + + + + binary + + out_invoice_yourcompany_demo.pdf + account.move + + + + + + + + + account.move + + Customer Invoice attachment + comment + + + + + + binary + + out_invoice_yourcompany_demo.pdf + account.move + + + + + + + + + account.move + + Customer Invoice attachment + comment + + + + + + binary + + out_invoice_yourcompany_demo.pdf + account.move + + + + + + + + + account.move + + Customer Invoice attachment + comment + + + + + + binary + + in_invoice_yourcompany_demo.pdf + account.move + + + + + + + + + account.move + + Vendor Bill attachment + comment + + + + + + binary + + in_invoice_yourcompany_demo.pdf + account.move + + + + + + + + + account.move + + Vendor Bill attachment + comment + + + diff --git a/addons/l10n_generic_coa/static/src/demo/in_invoice_yourcompany_demo.pdf b/addons/l10n_generic_coa/static/src/demo/in_invoice_yourcompany_demo_1.pdf similarity index 100% rename from addons/l10n_generic_coa/static/src/demo/in_invoice_yourcompany_demo.pdf rename to addons/l10n_generic_coa/static/src/demo/in_invoice_yourcompany_demo_1.pdf diff --git a/addons/l10n_generic_coa/static/src/demo/in_invoice_yourcompany_demo_2.pdf b/addons/l10n_generic_coa/static/src/demo/in_invoice_yourcompany_demo_2.pdf new file mode 100644 index 00000000000..59878fe1a78 Binary files /dev/null and b/addons/l10n_generic_coa/static/src/demo/in_invoice_yourcompany_demo_2.pdf differ diff --git a/addons/l10n_generic_coa/static/src/demo/out_invoice_yourcompany_demo_1.pdf b/addons/l10n_generic_coa/static/src/demo/out_invoice_yourcompany_demo_1.pdf new file mode 100644 index 00000000000..04e3a3db2bb Binary files /dev/null and b/addons/l10n_generic_coa/static/src/demo/out_invoice_yourcompany_demo_1.pdf differ diff --git a/addons/l10n_generic_coa/static/src/demo/out_invoice_yourcompany_demo_2.pdf b/addons/l10n_generic_coa/static/src/demo/out_invoice_yourcompany_demo_2.pdf new file mode 100644 index 00000000000..8049958d423 Binary files /dev/null and b/addons/l10n_generic_coa/static/src/demo/out_invoice_yourcompany_demo_2.pdf differ diff --git a/addons/l10n_generic_coa/static/src/demo/out_invoice_yourcompany_demo_3.pdf b/addons/l10n_generic_coa/static/src/demo/out_invoice_yourcompany_demo_3.pdf new file mode 100644 index 00000000000..9a159e3d5a9 Binary files /dev/null and b/addons/l10n_generic_coa/static/src/demo/out_invoice_yourcompany_demo_3.pdf differ diff --git a/addons/l10n_generic_coa/static/src/demo/out_invoice_yourcompany_demo_4.pdf b/addons/l10n_generic_coa/static/src/demo/out_invoice_yourcompany_demo_4.pdf new file mode 100644 index 00000000000..6aff5ccde1e Binary files /dev/null and b/addons/l10n_generic_coa/static/src/demo/out_invoice_yourcompany_demo_4.pdf differ