Merge lp:~openerp-dev/openobject-addons/trunk-bug-735403-ara into lp:openobject-addons

Proposed by Ashvin Rathod (OpenERP)
Status: Merged
Merged at revision: 4551
Proposed branch: lp:~openerp-dev/openobject-addons/trunk-bug-735403-ara
Merge into: lp:openobject-addons
Diff against target: 25 lines (+4/-4)
1 file modified
point_of_sale/wizard/pos_payment.py (+4/-4)
To merge this branch: bzr merge lp:~openerp-dev/openobject-addons/trunk-bug-735403-ara
Reviewer Review Type Date Requested Status
OpenERP buildbot (community) Disapprove
Mustufa Rangwala (Open ERP) (community) Approve
qdp (OpenERP) Pending
Review via email: mp+53598@code.launchpad.net

Description of the change

Hello,

Fix the bug: point_of_sale- point of sale without partner
https://bugs.launchpad.net/openobject-addons/+bug/735403

Thanks,
ara

To post a comment you must log in.
Revision history for this message
Mustufa Rangwala (Open ERP) (mra-tinyerp) :
review: Approve
Revision history for this message
OpenERP buildbot (openerp-buildbot) wrote :

product/test/product_report.yml: 'int' object is unsubscriptable
account/test/account_fiscalyear_close_state.yml: 'int' object is unsubscriptable
project/test/test_project_delegation.yml: 'int' object is unsubscriptable
project_long_term/test/test_schedule_phases_case1.yml: 'int' object is unsubscriptable
project_gtd/test/gtd_test.yml: 'int' object is unsubscriptable

review: Disapprove
Revision history for this message
OpenERP buildbot (openerp-buildbot) wrote :

product/test/product_report.yml: 'int' object is unsubscriptable
account/test/account_fiscalyear_close_state.yml: 'int' object is unsubscriptable
project/test/test_project_delegation.yml: 'int' object is unsubscriptable
project_long_term/test/test_schedule_phases_case1.yml: 'int' object is unsubscriptable
project_gtd/test/gtd_test.yml: 'int' object is unsubscriptable

review: Disapprove
Revision history for this message
OpenERP buildbot (openerp-buildbot) wrote :

product/test/product_report.yml: 'int' object is unsubscriptable
account/test/account_fiscalyear_close_state.yml: 'int' object is unsubscriptable
project/test/test_project_delegation.yml: 'int' object is unsubscriptable
project_long_term/test/test_schedule_phases_case1.yml: 'int' object is unsubscriptable
project_gtd/test/gtd_test.yml: 'int' object is unsubscriptable

review: Disapprove

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'point_of_sale/wizard/pos_payment.py'
2--- point_of_sale/wizard/pos_payment.py 2011-03-14 10:27:42 +0000
3+++ point_of_sale/wizard/pos_payment.py 2011-03-16 10:29:29 +0000
4@@ -150,10 +150,7 @@
5 amount = order.amount_total - order.amount_paid
6 data = self.read(cr, uid, ids, context=context)[0]
7 for m2o_field in ['product_id','pricelist_id','partner_id']:
8- data[m2o_field] = data[m2o_field][0]
9- partner = obj_partner.browse(cr, uid, data['partner_id'], context=context)
10- if not partner.address:
11- raise osv.except_osv(_('Error!'),_("Customer doesn't have an address to make the invoice"))
12+ data[m2o_field] = data.get(m2o_field, False) and data[m2o_field][0] or False
13 if data['is_acc']:
14 amount = self.pool.get('product.product').browse(cr, uid, data['product_id'], context=context).list_price
15
16@@ -163,6 +160,9 @@
17
18 if order_obj.test_paid(cr, uid, [active_id]):
19 if data['partner_id'] and data['invoice_wanted']:
20+ partner = obj_partner.browse(cr, uid, data['partner_id'], context=context)
21+ if not partner.address:
22+ raise osv.except_osv(_('Error!'),_("Customer doesn't have an address to make the invoice"))
23 order_obj.action_invoice(cr, uid, [active_id], context=context)
24 order_obj.create_picking(cr, uid, [active_id], context=context)
25 if context.get('return', False):

Subscribers

People subscribed via source and target branches

to all changes: