fix migration accounting issue
This commit is contained in:
parent
6585d25e26
commit
abc7540740
|
|
@ -249,12 +249,11 @@ class AccountPayment(models.Model):
|
|||
|
||||
def action_post(self):
|
||||
''' update petty cash expenses state '''
|
||||
if self.payment_petty_cash_id:
|
||||
self.payment_petty_cash_id.write({'state': 'done'})
|
||||
if self.petty_cash_id:
|
||||
self.petty_cash_id.write({'is_paid': True})
|
||||
print("petty_cash_remaining",self.petty_cash_id.petty_cash_remaining)
|
||||
print("amount",self.amount)
|
||||
for rec in self:
|
||||
if rec.payment_petty_cash_id:
|
||||
rec.payment_petty_cash_id.write({'state': 'done'})
|
||||
if rec.petty_cash_id:
|
||||
rec.petty_cash_id.write({'is_paid': True})
|
||||
return super().action_post()
|
||||
|
||||
def _prepare_move_line_default_vals(self, write_off_line_vals=None):
|
||||
|
|
|
|||
Loading…
Reference in New Issue