sale_down_payment: add a hook that can be used for notifications

This commit is contained in:
Alexis de Lattre
2021-05-27 23:08:17 +02:00
parent 592a82a417
commit dbbd14f58a
3 changed files with 16 additions and 1 deletions

View File

@@ -30,3 +30,8 @@ class AccountMoveLine(models.Model):
def sale_advance_payement_account_id_change(self):
if self.sale_id and self.account_id.user_type_id.type != 'receivable':
self.sale_id = False
def _sale_down_payment_hook(self):
# can be used for notifications
self.ensure_one()