mirror of
https://github.com/NaN-tic/trytond-patches.git
synced 2023-12-14 06:03:03 +01:00
Updated analytic_account/invoice/purchase/sale to commited version
This commit is contained in:
parent
745798a4ff
commit
b774e04191
|
@ -7,12 +7,9 @@ issue5104
|
||||||
|
|
||||||
review19141003
|
review19141003
|
||||||
|
|
||||||
Index: trytond/trytond/modules/analytic_account/account.py
|
diff -r cc5593b01647 account.py
|
||||||
===================================================================
|
--- a/trytond/trytond/modules/analytic_account/account.py Wed May 11 11:34:37 2016 +0200
|
||||||
|
+++ b/trytond/trytond/modules/analytic_account/account.py Wed Sep 28 13:57:57 2016 +0200
|
||||||
diff -r 0cd556f1c82c account.py
|
|
||||||
--- a/trytond/trytond/modules/analytic_account/account.py Sun Mar 13 16:19:22 2016 +0100
|
|
||||||
+++ b/trytond/trytond/modules/analytic_account/account.py Tue Apr 26 18:24:04 2016 +0200
|
|
||||||
@@ -8,7 +8,7 @@
|
@@ -8,7 +8,7 @@
|
||||||
from trytond import backend
|
from trytond import backend
|
||||||
from trytond.model import ModelView, ModelSQL, fields, Unique
|
from trytond.model import ModelView, ModelSQL, fields, Unique
|
||||||
|
@ -35,36 +32,53 @@ diff -r 0cd556f1c82c account.py
|
||||||
], 'Type', required=True)
|
], 'Type', required=True)
|
||||||
root = fields.Many2One('analytic_account.account', 'Root', select=True,
|
root = fields.Many2One('analytic_account.account', 'Root', select=True,
|
||||||
domain=[
|
domain=[
|
||||||
+ ('company', '=', Eval('company')),
|
+ ('company', '=', Eval('company', -1)),
|
||||||
('parent', '=', None),
|
('parent', '=', None),
|
||||||
('type', '=', 'root'),
|
('type', '=', 'root'),
|
||||||
],
|
],
|
||||||
@@ -40,7 +41,7 @@
|
@@ -40,15 +41,22 @@
|
||||||
'invisible': Eval('type') == 'root',
|
'invisible': Eval('type') == 'root',
|
||||||
'required': Eval('type') != 'root',
|
'required': Eval('type') != 'root',
|
||||||
},
|
},
|
||||||
- depends=['type'])
|
- depends=['type'])
|
||||||
+ depends=['company', 'type'])
|
+ depends=['company', 'type'])
|
||||||
parent = fields.Many2One('analytic_account.account', 'Parent', select=True,
|
parent = fields.Many2One('analytic_account.account', 'Parent', select=True,
|
||||||
domain=[('parent', 'child_of', Eval('root'))],
|
- domain=[('parent', 'child_of', Eval('root'))],
|
||||||
|
+ domain=['OR',
|
||||||
|
+ ('root', '=', Eval('root', -1)),
|
||||||
|
+ ('parent', '=', None),
|
||||||
|
+ ],
|
||||||
states={
|
states={
|
||||||
@@ -311,19 +312,26 @@
|
'invisible': Eval('type') == 'root',
|
||||||
|
'required': Eval('type') != 'root',
|
||||||
|
},
|
||||||
|
depends=['root', 'type'])
|
||||||
|
- childs = fields.One2Many('analytic_account.account', 'parent', 'Children')
|
||||||
|
+ childs = fields.One2Many('analytic_account.account', 'parent', 'Children',
|
||||||
|
+ domain=[
|
||||||
|
+ ('company', '=', Eval('company', -1)),
|
||||||
|
+ ],
|
||||||
|
+ depends=['company'])
|
||||||
|
balance = fields.Function(fields.Numeric('Balance',
|
||||||
|
digits=(16, Eval('currency_digits', 1)), depends=['currency_digits']),
|
||||||
|
'get_balance')
|
||||||
|
@@ -311,7 +319,14 @@
|
||||||
__name__ = 'analytic.account.entry'
|
__name__ = 'analytic.account.entry'
|
||||||
origin = fields.Reference('Origin', selection='get_origin', select=True)
|
origin = fields.Reference('Origin', selection='get_origin', select=True)
|
||||||
root = fields.Many2One('analytic_account.account', 'Root Analytic',
|
root = fields.Many2One('analytic_account.account', 'Root Analytic',
|
||||||
- domain=[('type', '=', 'root')])
|
- domain=[('type', '=', 'root')])
|
||||||
+ domain=[
|
+ domain=[
|
||||||
+ ('company', '=', Eval('company')),
|
+ If(~Eval('company'),
|
||||||
|
+ # No constraint if the origin is not set
|
||||||
|
+ (),
|
||||||
|
+ ('company', '=', Eval('company', -1))),
|
||||||
+ ('type', '=', 'root'),
|
+ ('type', '=', 'root'),
|
||||||
+ ],
|
+ ],
|
||||||
+ depends=['company'])
|
+ depends=['company'])
|
||||||
account = fields.Many2One('analytic_account.account', 'Account',
|
account = fields.Many2One('analytic_account.account', 'Account',
|
||||||
ondelete='RESTRICT',
|
ondelete='RESTRICT',
|
||||||
states={
|
states={
|
||||||
'required': Eval('required', False),
|
@@ -321,9 +336,11 @@
|
||||||
},
|
|
||||||
domain=[
|
|
||||||
+ ('company', '=', Eval('company')),
|
|
||||||
('root', '=', Eval('root')),
|
('root', '=', Eval('root')),
|
||||||
('type', '=', 'normal'),
|
('type', '=', 'normal'),
|
||||||
],
|
],
|
||||||
|
@ -77,35 +91,21 @@ diff -r 0cd556f1c82c account.py
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def __register__(cls, module_name):
|
def __register__(cls, module_name):
|
||||||
@@ -386,12 +394,27 @@
|
@@ -386,6 +403,13 @@
|
||||||
return self.root.mandatory
|
return self.root.mandatory
|
||||||
return False
|
return False
|
||||||
|
|
||||||
+ @classmethod
|
|
||||||
+ def default_company(cls):
|
|
||||||
+ return Transaction().context.get('company')
|
|
||||||
+
|
|
||||||
+ def on_change_with_company(self, name=None):
|
+ def on_change_with_company(self, name=None):
|
||||||
+ return Transaction().context.get('company')
|
+ return None
|
||||||
+
|
+
|
||||||
+ @classmethod
|
+ @classmethod
|
||||||
+ def search_company(cls, name, clause):
|
+ def search_company(cls, name, clause):
|
||||||
+ raise NotImplementedError()
|
+ return []
|
||||||
+
|
+
|
||||||
|
|
||||||
class AnalyticMixin(ModelSQL):
|
class AnalyticMixin(ModelSQL):
|
||||||
|
|
||||||
analytic_accounts = fields.One2Many('analytic.account.entry', 'origin',
|
@@ -427,13 +451,21 @@
|
||||||
'Analytic Accounts',
|
|
||||||
size=Eval('analytic_accounts_size', 0),
|
|
||||||
+ domain=[
|
|
||||||
+ ('company', If(Eval('context', {}).contains('company'), '=', '!='),
|
|
||||||
+ Eval('context', {}).get('company', -1)),
|
|
||||||
+ ],
|
|
||||||
depends=['analytic_accounts_size'])
|
|
||||||
analytic_accounts_size = fields.Function(fields.Integer(
|
|
||||||
'Analytic Accounts Size'), 'get_analytic_accounts_size')
|
|
||||||
@@ -427,13 +450,19 @@
|
|
||||||
where=entry.selection == selection_id))
|
where=entry.selection == selection_id))
|
||||||
handler.drop_column('analytic_accounts')
|
handler.drop_column('analytic_accounts')
|
||||||
|
|
||||||
|
@ -113,7 +113,9 @@ diff -r 0cd556f1c82c account.py
|
||||||
- def default_analytic_accounts():
|
- def default_analytic_accounts():
|
||||||
+ @classmethod
|
+ @classmethod
|
||||||
+ def analytic_accounts_domain(cls):
|
+ def analytic_accounts_domain(cls):
|
||||||
+ return PYSONDecoder(Transaction().context).decode(
|
+ context = Transaction().context.copy()
|
||||||
|
+ context['context'] = context
|
||||||
|
+ return PYSONDecoder(context).decode(
|
||||||
+ PYSONEncoder().encode(cls.analytic_accounts.domain))
|
+ PYSONEncoder().encode(cls.analytic_accounts.domain))
|
||||||
+
|
+
|
||||||
+ @classmethod
|
+ @classmethod
|
||||||
|
@ -128,7 +130,7 @@ diff -r 0cd556f1c82c account.py
|
||||||
('parent', '=', None),
|
('parent', '=', None),
|
||||||
])
|
])
|
||||||
for account in root_accounts:
|
for account in root_accounts:
|
||||||
@@ -443,11 +472,14 @@
|
@@ -443,11 +475,14 @@
|
||||||
})
|
})
|
||||||
return accounts
|
return accounts
|
||||||
|
|
||||||
|
@ -146,7 +148,7 @@ diff -r 0cd556f1c82c account.py
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def get_analytic_accounts_size(cls, records, name):
|
def get_analytic_accounts_size(cls, records, name):
|
||||||
@@ -464,12 +496,17 @@
|
@@ -464,12 +499,17 @@
|
||||||
"Check that all mandatory root entries are defined in entries"
|
"Check that all mandatory root entries are defined in entries"
|
||||||
pool = Pool()
|
pool = Pool()
|
||||||
Account = pool.get('analytic_account.account')
|
Account = pool.get('analytic_account.account')
|
||||||
|
@ -165,9 +167,9 @@ diff -r 0cd556f1c82c account.py
|
||||||
if not mandatory_roots <= analytic_roots:
|
if not mandatory_roots <= analytic_roots:
|
||||||
cls.raise_user_error('root_account', {
|
cls.raise_user_error('root_account', {
|
||||||
'name': analytic.rec_name,
|
'name': analytic.rec_name,
|
||||||
diff -r 0cd556f1c82c line.py
|
diff -r cc5593b01647 line.py
|
||||||
--- a/trytond/trytond/modules/analytic_account/line.py Sun Mar 13 16:19:22 2016 +0100
|
--- a/trytond/trytond/modules/analytic_account/line.py Wed May 11 11:34:37 2016 +0200
|
||||||
+++ b/trytond/trytond/modules/analytic_account/line.py Tue Apr 26 18:24:04 2016 +0200
|
+++ b/trytond/trytond/modules/analytic_account/line.py Wed Sep 28 13:57:57 2016 +0200
|
||||||
@@ -24,7 +24,7 @@
|
@@ -24,7 +24,7 @@
|
||||||
currency_digits = fields.Function(fields.Integer('Currency Digits'),
|
currency_digits = fields.Function(fields.Integer('Currency Digits'),
|
||||||
'on_change_with_currency_digits')
|
'on_change_with_currency_digits')
|
||||||
|
@ -188,22 +190,3 @@ diff -r 0cd556f1c82c line.py
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def query_get(table):
|
def query_get(table):
|
||||||
'''
|
'''
|
||||||
diff -r 0cd556f1c82c line.xml
|
|
||||||
--- a/trytond/trytond/modules/analytic_account/line.xml Sun Mar 13 16:19:22 2016 +0100
|
|
||||||
+++ b/trytond/trytond/modules/analytic_account/line.xml Tue Apr 26 18:24:04 2016 +0200
|
|
||||||
@@ -67,5 +67,15 @@
|
|
||||||
<field name="name">move_line_form</field>
|
|
||||||
</record>
|
|
||||||
|
|
||||||
+ <record model="ir.rule.group" id="rule_group_account_line">
|
|
||||||
+ <field name="model" search="[('model', '=', 'analytic_account.line')]"/>
|
|
||||||
+ <field name="global_p" eval="True"/>
|
|
||||||
+ </record>
|
|
||||||
+ <record model="ir.rule" id="rule_account_line1">
|
|
||||||
+ <field name="domain"
|
|
||||||
+ eval="[('company', '=', Eval('user', {}).get('company', None))]"
|
|
||||||
+ pyson="1"/>
|
|
||||||
+ <field name="rule_group" ref="rule_group_account_line"/>
|
|
||||||
+ </record>
|
|
||||||
</data>
|
|
||||||
</tryton>
|
|
||||||
|
|
|
@ -8,19 +8,36 @@ issue5104
|
||||||
|
|
||||||
review24081002
|
review24081002
|
||||||
|
|
||||||
Index: trytond/trytond/modules/analytic_invoice/invoice.py
|
diff -r 5d64f58a9c9b invoice.py
|
||||||
===================================================================
|
--- a/trytond/trytond/modules/analytic_invoice/invoice.py Wed May 11 11:48:47 2016 +0200
|
||||||
|
+++ b/trytond/trytond/modules/analytic_invoice/invoice.py Wed Sep 28 14:43:36 2016 +0200
|
||||||
--- a/trytond/trytond/modules/analytic_invoice/invoice.py
|
@@ -1,6 +1,8 @@
|
||||||
+++ b/trytond/trytond/modules/analytic_invoice/invoice.py
|
|
||||||
@@ -1,5 +1,6 @@
|
|
||||||
# This file is part of Tryton. The COPYRIGHT file at the top level of
|
# This file is part of Tryton. The COPYRIGHT file at the top level of
|
||||||
# this repository contains the full copyright notices and license terms.
|
# this repository contains the full copyright notices and license terms.
|
||||||
+from trytond.model import fields
|
+from trytond.model import fields
|
||||||
from trytond.pool import PoolMeta, Pool
|
from trytond.pool import PoolMeta, Pool
|
||||||
|
+from trytond.pyson import Eval, If
|
||||||
|
|
||||||
from trytond.modules.analytic_account import AnalyticMixin
|
from trytond.modules.analytic_account import AnalyticMixin
|
||||||
@@ -61,3 +62,24 @@
|
|
||||||
|
@@ -10,6 +12,16 @@
|
||||||
|
class InvoiceLine(AnalyticMixin):
|
||||||
|
__name__ = 'account.invoice.line'
|
||||||
|
|
||||||
|
+ @classmethod
|
||||||
|
+ def __setup__(cls):
|
||||||
|
+ super(InvoiceLine, cls).__setup__()
|
||||||
|
+ cls.analytic_accounts.domain = [
|
||||||
|
+ ('company', '=', If(~Eval('company'),
|
||||||
|
+ Eval('context', {}).get('company', -1),
|
||||||
|
+ Eval('company', -1))),
|
||||||
|
+ ]
|
||||||
|
+ cls.analytic_accounts.depends.append('company')
|
||||||
|
+
|
||||||
|
def _credit(self):
|
||||||
|
pool = Pool()
|
||||||
|
AnalyticAccountEntry = pool.get('analytic.account.entry')
|
||||||
|
@@ -61,3 +73,22 @@
|
||||||
def _get_origin(cls):
|
def _get_origin(cls):
|
||||||
origins = super(AnalyticAccountEntry, cls)._get_origin()
|
origins = super(AnalyticAccountEntry, cls)._get_origin()
|
||||||
return origins + ['account.invoice.line']
|
return origins + ['account.invoice.line']
|
||||||
|
@ -32,17 +49,14 @@ Index: trytond/trytond/modules/analytic_invoice/invoice.py
|
||||||
+ company = super(AnalyticAccountEntry, self).on_change_with_company(
|
+ company = super(AnalyticAccountEntry, self).on_change_with_company(
|
||||||
+ name)
|
+ name)
|
||||||
+ if isinstance(self.origin, InvoiceLine):
|
+ if isinstance(self.origin, InvoiceLine):
|
||||||
+ if self.origin.invoice:
|
+ company = self.origin.company.id
|
||||||
+ return self.origin.invoice.company.id
|
|
||||||
+ elif self.origin.company:
|
|
||||||
+ return self.origin.company.id
|
|
||||||
+ return company
|
+ return company
|
||||||
+
|
+
|
||||||
+ @classmethod
|
+ @classmethod
|
||||||
+ def search_company(cls, name, clause):
|
+ def search_company(cls, name, clause):
|
||||||
|
+ domain = super(AnalyticAccountEntry, cls).search_company(name, clause),
|
||||||
+ return ['OR',
|
+ return ['OR',
|
||||||
+ [('origin.company',) + tuple(clause[1:]) +
|
+ domain,
|
||||||
+ tuple(('account.invoice.line',))],
|
+ (('origin.company',) + tuple(clause[1:]) +
|
||||||
+ [('origin.invoice.company',) + tuple(clause[1:]) +
|
+ ('account.invoice.line',)),
|
||||||
+ tuple(('account.invoice.line',))]]
|
+ ]
|
||||||
|
|
||||||
|
|
|
@ -2,16 +2,38 @@
|
||||||
# User Sergi Almacellas Abellana <sergi@koolpi.com>
|
# User Sergi Almacellas Abellana <sergi@koolpi.com>
|
||||||
Add company domain on analytic entries
|
Add company domain on analytic entries
|
||||||
|
|
||||||
issue5104
|
issue5104
|
||||||
|
|
||||||
review17201002
|
review17201002
|
||||||
|
|
||||||
Index: trytond/trytond/modules/analytic_purchase/purchase.py
|
diff -r 8fda42e64b7a purchase.py
|
||||||
===================================================================
|
--- a/trytond/trytond/modules/analytic_purchase/purchase.py Wed May 11 12:01:56 2016 +0200
|
||||||
|
+++ b/trytond/trytond/modules/analytic_purchase/purchase.py Wed Sep 28 14:47:26 2016 +0200
|
||||||
|
@@ -2,6 +2,7 @@
|
||||||
|
# this repository contains the full copyright notices and license terms.
|
||||||
|
from trytond.model import fields
|
||||||
|
from trytond.pool import Pool, PoolMeta
|
||||||
|
+from trytond.pyson import Eval, If
|
||||||
|
|
||||||
--- a/trytond/trytond/modules/analytic_purchase/purchase.py
|
from trytond.modules.analytic_account import AnalyticMixin
|
||||||
+++ b/trytond/trytond/modules/analytic_purchase/purchase.py
|
|
||||||
@@ -79,3 +79,22 @@
|
@@ -46,6 +47,15 @@
|
||||||
|
class PurchaseLine(AnalyticMixin):
|
||||||
|
__name__ = 'purchase.line'
|
||||||
|
|
||||||
|
+ @classmethod
|
||||||
|
+ def __setup__(cls):
|
||||||
|
+ super(PurchaseLine, cls).__setup__()
|
||||||
|
+ cls.analytic_accounts.domain = [
|
||||||
|
+ ('company', '=', If(~Eval('_parent_purchase'),
|
||||||
|
+ Eval('context', {}).get('company', -1),
|
||||||
|
+ Eval('_parent_purchase', {}).get('company', -1))),
|
||||||
|
+ ]
|
||||||
|
+
|
||||||
|
def get_invoice_line(self):
|
||||||
|
pool = Pool()
|
||||||
|
AnalyticAccountEntry = pool.get('analytic.account.entry')
|
||||||
|
@@ -79,3 +89,22 @@
|
||||||
and self.origin.purchase.state in ['cancel', 'draft']):
|
and self.origin.purchase.state in ['cancel', 'draft']):
|
||||||
return False
|
return False
|
||||||
return required
|
return required
|
||||||
|
@ -22,9 +44,8 @@ Index: trytond/trytond/modules/analytic_purchase/purchase.py
|
||||||
+ PurchaseLine = pool.get('purchase.line')
|
+ PurchaseLine = pool.get('purchase.line')
|
||||||
+ company = super(AnalyticAccountEntry, self).on_change_with_company(
|
+ company = super(AnalyticAccountEntry, self).on_change_with_company(
|
||||||
+ name)
|
+ name)
|
||||||
+ if isinstance(self.origin, PurchaseLine):
|
+ if isinstance(self.origin, PurchaseLine) and self.origin.purchase:
|
||||||
+ if self.origin.purchase:
|
+ company = self.origin.purchase.company.id
|
||||||
+ return self.origin.purchase.company.id
|
|
||||||
+ return company
|
+ return company
|
||||||
+
|
+
|
||||||
+ @classmethod
|
+ @classmethod
|
||||||
|
@ -32,6 +53,6 @@ Index: trytond/trytond/modules/analytic_purchase/purchase.py
|
||||||
+ domain = super(AnalyticAccountEntry, cls).search_company(name, clause)
|
+ domain = super(AnalyticAccountEntry, cls).search_company(name, clause)
|
||||||
+ return ['OR',
|
+ return ['OR',
|
||||||
+ domain,
|
+ domain,
|
||||||
+ [('origin.purchase.company',) + tuple(clause[1:]) +
|
+ (('origin.purchase.company',) + tuple(clause[1:])
|
||||||
+ tuple(('purchase.line',))]]
|
+ + ('purchase.line',)),
|
||||||
|
+ ]
|
||||||
|
|
|
@ -7,19 +7,35 @@ issue5104
|
||||||
|
|
||||||
review17991002
|
review17991002
|
||||||
|
|
||||||
Index: trytond/trytond/modules/analytic_sale/sale.py
|
diff -r 1241acbd3ec3 sale.py
|
||||||
===================================================================
|
--- a/trytond/trytond/modules/analytic_sale/sale.py Wed May 11 11:56:32 2016 +0200
|
||||||
|
+++ b/trytond/trytond/modules/analytic_sale/sale.py Wed Sep 28 14:49:23 2016 +0200
|
||||||
--- a/trytond/trytond/modules/analytic_sale/sale.py
|
@@ -1,6 +1,8 @@
|
||||||
+++ b/trytond/trytond/modules/analytic_sale/sale.py
|
|
||||||
@@ -1,5 +1,6 @@
|
|
||||||
# This file is part of Tryton. The COPYRIGHT file at the top level of
|
# This file is part of Tryton. The COPYRIGHT file at the top level of
|
||||||
# this repository contains the full copyright notices and license terms.
|
# this repository contains the full copyright notices and license terms.
|
||||||
+from trytond.model import fields
|
+from trytond.model import fields
|
||||||
from trytond.pool import Pool, PoolMeta
|
from trytond.pool import Pool, PoolMeta
|
||||||
|
+from trytond.pyson import Eval, If
|
||||||
|
|
||||||
from trytond.modules.analytic_account import AnalyticMixin
|
from trytond.modules.analytic_account import AnalyticMixin
|
||||||
@@ -32,3 +33,22 @@
|
|
||||||
|
@@ -10,6 +12,15 @@
|
||||||
|
class SaleLine(AnalyticMixin):
|
||||||
|
__name__ = 'sale.line'
|
||||||
|
|
||||||
|
+ @classmethod
|
||||||
|
+ def __setup__(cls):
|
||||||
|
+ super(SaleLine, cls).__setup__()
|
||||||
|
+ cls.analytic_accounts.domain = [
|
||||||
|
+ ('company', '=', If(~Eval('_parent_sale', {}),
|
||||||
|
+ Eval('context', {}).get('company', -1),
|
||||||
|
+ Eval('_parent_sale', {}).get('company', -1))),
|
||||||
|
+ ]
|
||||||
|
+
|
||||||
|
def get_invoice_line(self):
|
||||||
|
pool = Pool()
|
||||||
|
AnalyticAccountEntry = pool.get('analytic.account.entry')
|
||||||
|
@@ -32,3 +43,21 @@
|
||||||
def _get_origin(cls):
|
def _get_origin(cls):
|
||||||
origins = super(AnalyticAccountEntry, cls)._get_origin()
|
origins = super(AnalyticAccountEntry, cls)._get_origin()
|
||||||
return origins + ['sale.line']
|
return origins + ['sale.line']
|
||||||
|
@ -30,16 +46,14 @@ Index: trytond/trytond/modules/analytic_sale/sale.py
|
||||||
+ SaleLine = pool.get('sale.line')
|
+ SaleLine = pool.get('sale.line')
|
||||||
+ company = super(AnalyticAccountEntry, self).on_change_with_company(
|
+ company = super(AnalyticAccountEntry, self).on_change_with_company(
|
||||||
+ name)
|
+ name)
|
||||||
+ if isinstance(self.origin, SaleLine):
|
+ if isinstance(self.origin, SaleLine) and self.origin.sale:
|
||||||
+ if self.origin.sale:
|
+ company = self.origin.sale.company.id
|
||||||
+ return self.origin.sale.company.id
|
|
||||||
+ return company
|
+ return company
|
||||||
+
|
+
|
||||||
+ @classmethod
|
+ @classmethod
|
||||||
+ def search_company(cls, name, clause):
|
+ def search_company(cls, name, clause):
|
||||||
+ domain = super(AnalyticAccountEntry, cls).search_company(name, clause)
|
+ domain = super(AnalyticAccountEntry, cls).search_company(name, clause),
|
||||||
+ return ['OR',
|
+ return ['OR',
|
||||||
+ domain,
|
+ domain,
|
||||||
+ [('origin.sale.company',) + tuple(clause[1:]) +
|
+ ('origin.sale.company',) + tuple(clause[1:]) + ('sale.line',),
|
||||||
+ tuple(('sale.line',))]]
|
+ ]
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue