[FIX] Clearing lines should not have a partner, because of the new

constraint
This commit is contained in:
unknown
2013-07-29 08:17:31 +02:00
committed by Holger Brunn
2 changed files with 4 additions and 3 deletions

View File

@@ -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),

View File

@@ -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"