Move the analytics fields of supplier invoices to General tab of invoice line. Task 040379

This commit is contained in:
MarinaNico 2020-05-21 13:19:00 +02:00
parent 00a4f43d3b
commit ec6c3137a7
4 changed files with 31 additions and 0 deletions

View File

@ -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,
}),
]

12
invoice.xml Normal file
View File

@ -0,0 +1,12 @@
<?xml version="1.0"?>
<!-- This file is part of Tryton. The COPYRIGHT file at the top level of
this repository contains the full copyright notices and license terms. -->
<tryton>
<data>
<record model="ir.ui.view" id="invoice_line_view_form">
<field name="model">account.invoice.line</field>
<field name="inherit" ref="account_invoice.invoice_line_view_form"/>
<field name="name">invoice_line_form</field>
</record>
</data>
</tryton>

View File

@ -6,7 +6,9 @@ depends:
company
extras_depend:
account_invoice
analytic_invoice
xml:
account.xml
analytic.xml
invoice.xml
messages.xml

View File

@ -0,0 +1,9 @@
<?xml version="1.0"?>
<!-- This file is part of Tryton. The COPYRIGHT file at the top level of
this repository contains the full copyright notices and license terms. -->
<data>
<xpath expr="/form/notebook/page[@id='general']/field[@name='taxes']"
position="after">
<field name="analytic_accounts" colspan="4"/>
</xpath>
</data>