changeset bfb463a07cd7 in modules/account_stock_landed_cost:5.8
details: 
https://hg.tryton.org/modules/account_stock_landed_cost?cmd=changeset&node=bfb463a07cd7
description:
        Limit invoice line to same company as landed cost

        issue10438
        review336251002
        (grafted from 058f2e23a600d9bd1b84984fed55f15c42cd951c)
diffstat:

 account.py |  3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diffs (18 lines):

diff -r db72769254e1 -r bfb463a07cd7 account.py
--- a/account.py        Fri Jan 01 16:23:18 2021 +0100
+++ b/account.py        Wed May 26 23:44:13 2021 +0200
@@ -108,12 +108,13 @@
             ('landed_cost', '=', None),
             ],
         domain=[
+            ('company', '=', Eval('company', -1)),
             ('invoice.state', 'in', ['posted', 'paid']),
             ('invoice.type', '=', 'in'),
             ('product.template.landed_cost', '=', True),
             ('type', '=', 'line'),
             ],
-        depends=['state'])
+        depends=['state', 'company'])
     allocation_method = fields.Selection([
             ('value', 'By Value'),
             ], 'Allocation Method', required=True,

Reply via email to