Finalise the wizard of selection of move lines to pay

Add button "Add to payment/debit order" on invoice form view
Started to integrate payment transfer in account_payment_order (not finished at all though)
Various fixes/changes/improvements/...
This commit is contained in:
Alexis de Lattre
2016-05-06 01:16:20 +02:00
parent 3c8c2e9e70
commit abb052d894
28 changed files with 446 additions and 330 deletions

View File

@@ -20,6 +20,9 @@ class AccountPaymentLine(models.Model):
related='order_id.company_currency_id', store=True, readonly=True)
payment_type = fields.Selection(
related='order_id.payment_type', store=True, readonly=True)
state = fields.Selection(
related='order_id.state', string='State',
readonly=True, store=True)
move_line_id = fields.Many2one(
'account.move.line', string='Journal Item')
ml_maturity_date = fields.Date(
@@ -83,6 +86,11 @@ class AccountPaymentLine(models.Model):
values = []
for field in bplo.same_fields_payment_line_and_bank_payment_line():
values.append(unicode(self[field]))
# Don't group the payment lines that are attached to the same supplier
# but to move lines with different accounts (very unlikely),
# for easier generation/comprehension of the transfer move
# TODO Alexis : but this is for ????
values.append(unicode(self.move_line_id.account_id or False))
hashcode = '-'.join(values)
return hashcode