File tree Expand file tree Collapse file tree 2 files changed +5
-4
lines changed
l10n_it_split_payment/models Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -42,18 +42,19 @@ def _compute_amount(self):
4242 return res
4343
4444 def write (self , vals ):
45+ if self .env .context .get ("skip_split_payment_computation" ):
46+ return super (AccountMove , self ).write (vals )
4547 res = super (AccountMove , self .with_context (check_move_validity = False )).write (
4648 vals
4749 )
48- if self .env .context .get ("skip_split_payment_computation" ):
49- return res
5050 if "fiscal_position_id" in vals :
5151 self ._compute_amount ()
5252 self .with_context (
5353 skip_split_payment_computation = True , check_move_validity = False
5454 ).compute_split_payment ()
5555 container = {"records" : self }
56- self ._check_balanced (container )
56+ with self ._check_balanced (container ):
57+ pass
5758 return res
5859
5960 def copy (self , default = None ):
Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ class AccountMoveLine(models.Model):
1717 def _compute_is_split_payment (self ):
1818 for line in self :
1919 line .is_split_payment = False
20- if line .account_id == line .company_id .sp_account_id :
20+ if line .account_id and line . account_id == line .company_id .sp_account_id :
2121 line .is_split_payment = True
2222
2323 def _compute_all_tax (self ):
You can’t perform that action at this time.
0 commit comments