FIX analytic_invoice extra-depends

This commit is contained in:
Raimon Esteve 2022-01-26 14:53:23 +01:00
parent 89eeb5d3ef
commit d99e17d938
3 changed files with 6 additions and 3 deletions

View File

@ -10,6 +10,10 @@ class InvoiceLine(metaclass=PoolMeta):
def get_move_lines(self):
lines = super(InvoiceLine, self).get_move_lines()
if not hasattr(self, 'analytic_accounts'):
return lines
if self.invoice and self.invoice.type:
type_ = self.invoice.type
else:

View File

@ -2,7 +2,7 @@
<!-- 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 depends="account_invoice">
<data depends="account_invoice,analytic_invoice">
<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"/>

View File

@ -2,8 +2,7 @@
<!-- 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">
<xpath expr="/form/notebook/page[@id='general']/field[@name='taxes']" position="after">
<field name="analytic_accounts" colspan="4"/>
</xpath>
</data>