Merge lp:~openerp-dev/openobject-addons/trunk-bug-payment_partner_label-nco into lp:openobject-addons

Proposed by Nimesh Contractor(Open ERP)
Status: Needs review
Proposed branch: lp:~openerp-dev/openobject-addons/trunk-bug-payment_partner_label-nco
Merge into: lp:openobject-addons
Diff against target: 25 lines (+3/-1)
2 files modified
account_voucher/account_voucher.py (+2/-0)
account_voucher/voucher_payment_receipt_view.xml (+1/-1)
To merge this branch: bzr merge lp:~openerp-dev/openobject-addons/trunk-bug-payment_partner_label-nco
Reviewer Review Type Date Requested Status
Atul Patel(OpenERP) (community) Approve
OpenERP Core Team Pending
Review via email: mp+140830@code.launchpad.net

Description of the change

Hello,

      Set the partner label to "Customer" if the pay the Sale Order and "Supplier" if pay the Purchase Order.

Thanks,
 NCO.

To post a comment you must log in.
Revision history for this message
Atul Patel(OpenERP) (atp-openerp) :
review: Approve

Unmerged revisions

8421. By Nimesh Contractor(Open ERP)

[FIX] set the partner label(Customer or Supplier) on pay invoice dialog.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'account_voucher/account_voucher.py'
2--- account_voucher/account_voucher.py 2012-12-18 17:55:47 +0000
3+++ account_voucher/account_voucher.py 2012-12-20 07:28:55 +0000
4@@ -194,6 +194,8 @@
5 nodes = doc.xpath("//field[@name='partner_id']")
6 for node in nodes:
7 node.set('domain', "[('supplier', '=', True)]")
8+ node.set('string', _('Supplier'))
9+ node.set('context', "{'search_default_supplier': 1}")
10 res['arch'] = etree.tostring(doc)
11 return res
12
13
14=== modified file 'account_voucher/voucher_payment_receipt_view.xml'
15--- account_voucher/voucher_payment_receipt_view.xml 2012-12-08 10:33:38 +0000
16+++ account_voucher/voucher_payment_receipt_view.xml 2012-12-20 07:28:55 +0000
17@@ -292,7 +292,7 @@
18 <group>
19 <group>
20 <field name="state" invisible="1"/>
21- <field name="partner_id" required="1" on_change="onchange_partner_id(partner_id, journal_id, amount, currency_id, type, date, context)" string="Supplier" context="{'search_default_supplier': 1}"/>
22+ <field name="partner_id" required="1" on_change="onchange_partner_id(partner_id, journal_id, amount, currency_id, type, date, context)" domain="[('customer','=', True)]" string="Customer" context="{'search_default_customer': 1}"/>
23 <field name="currency_id" invisible="1"/>
24 <field name="amount" class="oe_inline"
25 string="Paid Amount"

Subscribers

People subscribed via source and target branches

to all changes: