[IMP] hr_commission: Remove implicit requirement on sale

This commit is contained in:
Jared Kipe
2020-09-30 09:40:02 -07:00
parent 1518c80823
commit fa1f940bc4
4 changed files with 10 additions and 8 deletions

View File

@@ -24,8 +24,8 @@ class AccountMove(models.Model):
'context': {'search_default_source_move_id': self[0].id}
}
def action_post(self):
res = super(AccountMove, self).action_post()
def post(self):
res = super(AccountMove, self).post()
invoices = self.filtered(lambda m: m.is_invoice())
if invoices:
self.env['hr.commission'].invoice_validated(invoices)