mirror of
https://github.com/OCA/bank-payment.git
synced 2025-02-02 10:37:31 +02:00
[FIX] Clearing lines should not have a partner, because of the new
constraint
This commit is contained in:
@@ -315,7 +315,7 @@ class payment_order(orm.Model):
|
||||
line.move_line_id.invoice.number or
|
||||
line.move_line_id.name),
|
||||
'move_id': move_id,
|
||||
'partner_id': line.partner_id.id,
|
||||
'partner_id': False,
|
||||
'account_id': order.mode.transfer_account_id.id,
|
||||
'credit': (order.payment_order_type == 'payment'
|
||||
and line.amount or 0.0),
|
||||
@@ -329,6 +329,7 @@ class payment_order(orm.Model):
|
||||
|
||||
# create the debit move line on the receivable account
|
||||
vals.update({
|
||||
'partner_id': line.partner_id.id,
|
||||
'account_id': line.move_line_id.account_id.id,
|
||||
'credit': (order.payment_order_type == 'debit'
|
||||
and line.amount or 0.0),
|
||||
|
||||
@@ -32,13 +32,13 @@
|
||||
<field name="reference" position="after">
|
||||
<field name="payment_order_type"/>
|
||||
</field>
|
||||
<xpath expr="/form/group/button[@string='Select Invoices to Pay']"
|
||||
<xpath expr="//button[@string='Select Invoices to Pay']"
|
||||
position="attributes">
|
||||
<attribute name="attrs">
|
||||
{'invisible':['|',('state','!=','draft'),('payment_order_type', '!=', 'payment')]}
|
||||
</attribute>
|
||||
</xpath>
|
||||
<xpath expr="/form/group/button[@string='Select Invoices to Pay']"
|
||||
<xpath expr="//button[@string='Select Invoices to Pay']"
|
||||
position="after">
|
||||
<button colspan="2" name="%(account_payment.action_create_payment_order)s"
|
||||
string="Select Invoices to Collect" type="action"
|
||||
|
||||
Reference in New Issue
Block a user