diff --git a/invoice.py b/invoice.py index eac19ab..2b6e485 100644 --- a/invoice.py +++ b/invoice.py @@ -30,3 +30,11 @@ class InvoiceLine(metaclass=PoolMeta): if analytic_lines: line.analytic_lines = analytic_lines return lines + + @classmethod + def view_attributes(cls): + return super(InvoiceLine, cls).view_attributes() + [ + ('/form/notebook/page[@id="analytic_accounts"]', 'states', { + 'invisible': True, + }), + ] diff --git a/invoice.xml b/invoice.xml new file mode 100644 index 0000000..0fff583 --- /dev/null +++ b/invoice.xml @@ -0,0 +1,12 @@ + + + + + + account.invoice.line + + invoice_line_form + + + diff --git a/tryton.cfg b/tryton.cfg index 13cde48..c870280 100644 --- a/tryton.cfg +++ b/tryton.cfg @@ -6,7 +6,9 @@ depends: company extras_depend: account_invoice + analytic_invoice xml: account.xml analytic.xml + invoice.xml messages.xml diff --git a/view/invoice_line_form.xml b/view/invoice_line_form.xml new file mode 100644 index 0000000..ff4317b --- /dev/null +++ b/view/invoice_line_form.xml @@ -0,0 +1,9 @@ + + + + + + +