Skip to content
Snippets Groups Projects
Commit d2fde716 authored by Marco Folco's avatar Marco Folco
Browse files

[MOD] payment order

Removed change of benefits state from payment, it nows happen on the write of the invoice
parent 898f3bde
No related branches found
No related tags found
1 merge request!46Resolve SOF-90 "Quitar cantidad prestaciones"
......@@ -12,11 +12,3 @@ _logger = logging.getLogger(__name__)
class AccountPaymentOrder(models.Model):
_inherit = "account.payment.order"
@api.multi
def proforma_voucher(self):
res = super(AccountPaymentOrder, self).proforma_voucher()
to_charge = self.income_line_ids.filtered(lambda x: x.reconcile or x.amount_unreconciled == x.amount)
for line in to_charge:
benefits = line.invoice_id.invoice_line_ids.mapped('benefit_id').filtered(lambda x: x.invoice_id)
benefits.write({'state': 'charged'})
return res
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment