Merge lp:~etsinko/openobject-addons/bug1131970 into lp:openobject-addons

Proposed by Amit Parik
Status: Needs review
Proposed branch: lp:~etsinko/openobject-addons/bug1131970
Merge into: lp:openobject-addons
Diff against target: 40 lines (+10/-7)
2 files modified
purchase/purchase.py (+6/-5)
sale/sale.py (+4/-2)
To merge this branch: bzr merge lp:~etsinko/openobject-addons/bug1131970
Reviewer Review Type Date Requested Status
Amit Parik (community) Approve
OpenERP Core Team Pending
Review via email: mp+150965@code.launchpad.net

Description of the change

on_change_partner on sale and purchase check payment_terms and fiscal position available or not.

To post a comment you must log in.
Revision history for this message
Amit Parik (amit-parik) :
review: Approve
Revision history for this message
Amit Parik (amit-parik) wrote :

opps... there are lots of conflicts on your branch, I have seen only your last comment which is fine.

Please remove all conflicts.

Thank you!

review: Needs Fixing
Revision history for this message
Egor Tsinko (etsinko) wrote :

Hi Amit,
I branched from 7.0 Branch. Should I redo this with a trunk branch?

Thank you

8583. By Egor Tsinko

[Fix] Default net term in Purchase and Sales orders is overridden with blank

Revision history for this message
Amit Parik (amit-parik) wrote :

Hi Egor,

Yup, now its good.. :)

review: Approve

Unmerged revisions

8583. By Egor Tsinko

[Fix] Default net term in Purchase and Sales orders is overridden with blank

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'purchase/purchase.py'
--- purchase/purchase.py 2013-01-31 09:47:28 +0000
+++ purchase/purchase.py 2013-02-28 15:38:21 +0000
@@ -298,11 +298,12 @@
298 }}298 }}
299 supplier_address = partner.address_get(cr, uid, [partner_id], ['default'])299 supplier_address = partner.address_get(cr, uid, [partner_id], ['default'])
300 supplier = partner.browse(cr, uid, partner_id)300 supplier = partner.browse(cr, uid, partner_id)
301 return {'value': {301 value = {'pricelist_id': supplier.property_product_pricelist_purchase.id}
302 'pricelist_id': supplier.property_product_pricelist_purchase.id,302 if supplier.property_supplier_payment_term:
303 'fiscal_position': supplier.property_account_position and supplier.property_account_position.id or False,303 value['payment_term_id'] = supplier.property_supplier_payment_term.id
304 'payment_term_id': supplier.property_supplier_payment_term.id or False,304 if supplier.property_account_position:
305 }}305 value['fiscal_position'] = supplier.property_account_position.id
306 return {'value': value}
306307
307 def invoice_open(self, cr, uid, ids, context=None):308 def invoice_open(self, cr, uid, ids, context=None):
308 mod_obj = self.pool.get('ir.model.data')309 mod_obj = self.pool.get('ir.model.data')
309310
=== modified file 'sale/sale.py'
--- sale/sale.py 2013-02-14 10:06:28 +0000
+++ sale/sale.py 2013-02-28 15:38:21 +0000
@@ -327,10 +327,12 @@
327 val = {327 val = {
328 'partner_invoice_id': addr['invoice'],328 'partner_invoice_id': addr['invoice'],
329 'partner_shipping_id': addr['delivery'],329 'partner_shipping_id': addr['delivery'],
330 'payment_term': payment_term,
331 'fiscal_position': fiscal_position,
332 'user_id': dedicated_salesman,330 'user_id': dedicated_salesman,
333 }331 }
332 if fiscal_position:
333 val['fiscal_position'] = fiscal_position
334 if payment_term:
335 val['payment_term'] = payment_term
334 if pricelist:336 if pricelist:
335 val['pricelist_id'] = pricelist337 val['pricelist_id'] = pricelist
336 return {'value': val}338 return {'value': val}

Subscribers

People subscribed via source and target branches

to all changes: