mirror of
https://gitlab.com/hibou-io/hibou-odoo/suite.git
synced 2025-01-20 12:37:31 +02:00
IMP sale_payment_deposit Only make deposit invoice if no other invoices are present (e.g. cancelled SO re-confirming).
This commit is contained in:
committed by
Cedric Collins
parent
dcc27a0d9c
commit
350cd80135
@@ -19,7 +19,7 @@ class SaleOrder(models.Model):
|
||||
|
||||
def _auto_deposit_invoice(self):
|
||||
wizard_model = self.env['sale.advance.payment.inv'].sudo()
|
||||
for sale in self.sudo().filtered(lambda o: o.amount_total_deposit):
|
||||
for sale in self.sudo().filtered(lambda o: not o.invoice_ids and o.amount_total_deposit):
|
||||
# Create Deposit Invoices
|
||||
wizard = wizard_model.create({
|
||||
'advance_payment_method': 'percentage',
|
||||
|
||||
Reference in New Issue
Block a user