Merge lp:~openerp-dev/openobject-addons/trunk-improve-sale-order-sgo into lp:openobject-addons

Proposed by Sanjay Gohel (Open ERP)
Status: Needs review
Proposed branch: lp:~openerp-dev/openobject-addons/trunk-improve-sale-order-sgo
Merge into: lp:openobject-addons
Diff against target: 43 lines (+10/-1)
3 files modified
product/product.py (+1/-1)
purchase/purchase.py (+4/-0)
sale/sale.py (+5/-0)
To merge this branch: bzr merge lp:~openerp-dev/openobject-addons/trunk-improve-sale-order-sgo
Reviewer Review Type Date Requested Status
OpenERP Core Team Pending
Review via email: mp+148087@code.launchpad.net

Description of the change

Hello,
         I have improved following things,
1. Set default = 0 sale price on product.
2. If sale price is 0 than no on change on price of product in SO and PO.

Thank You.
Sanjay Gohel(SGO)

To post a comment you must log in.
8549. By Sanjay Gohel (Open ERP)

[IMP]improve code

Unmerged revisions

8549. By Sanjay Gohel (Open ERP)

[IMP]improve code

8548. By Sanjay Gohel (Open ERP)

[MERGE]sync with trunk

8547. By Sanjay Gohel (Open ERP)

[IMP]in purchase if product list price is 0 set price unit as per before

8546. By Sanjay Gohel (Open ERP)

[IMP]set product default sale price as 0 and changed in product on change in sale order

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'product/product.py'
--- product/product.py 2012-12-18 22:06:17 +0000
+++ product/product.py 2013-02-13 05:59:22 +0000
@@ -363,7 +363,7 @@
363363
364 _defaults = {364 _defaults = {
365 'company_id': lambda s,cr,uid,c: s.pool.get('res.company')._company_default_get(cr, uid, 'product.template', context=c),365 'company_id': lambda s,cr,uid,c: s.pool.get('res.company')._company_default_get(cr, uid, 'product.template', context=c),
366 'list_price': 1,366 'list_price': 0,
367 'cost_method': 'standard',367 'cost_method': 'standard',
368 'standard_price': 0.0,368 'standard_price': 0.0,
369 'sale_ok': 1,369 'sale_ok': 1,
370370
=== modified file 'purchase/purchase.py'
--- purchase/purchase.py 2012-12-21 16:48:08 +0000
+++ purchase/purchase.py 2013-02-13 05:59:22 +0000
@@ -975,6 +975,10 @@
975 taxes = account_tax.browse(cr, uid, map(lambda x: x.id, product.supplier_taxes_id))975 taxes = account_tax.browse(cr, uid, map(lambda x: x.id, product.supplier_taxes_id))
976 fpos = fiscal_position_id and account_fiscal_position.browse(cr, uid, fiscal_position_id, context=context) or False976 fpos = fiscal_position_id and account_fiscal_position.browse(cr, uid, fiscal_position_id, context=context) or False
977 taxes_ids = account_fiscal_position.map_tax(cr, uid, fpos, taxes)977 taxes_ids = account_fiscal_position.map_tax(cr, uid, fpos, taxes)
978
979 if product.list_price == 0:
980 price = price_unit
981
978 res['value'].update({'price_unit': price, 'taxes_id': taxes_ids})982 res['value'].update({'price_unit': price, 'taxes_id': taxes_ids})
979983
980 return res984 return res
981985
=== modified file 'sale/sale.py'
--- sale/sale.py 2013-01-31 18:43:56 +0000
+++ sale/sale.py 2013-02-13 05:59:22 +0000
@@ -960,6 +960,11 @@
960 'title': _('Configuration Error!'),960 'title': _('Configuration Error!'),
961 'message' : warning_msgs961 'message' : warning_msgs
962 }962 }
963
964 record = self.browse(cr, uid, ids, context=context)
965 if record and product_obj.list_price == 0:
966 result.update({'price_unit': record[0].price_unit})
967
963 return {'value': result, 'domain': domain, 'warning': warning}968 return {'value': result, 'domain': domain, 'warning': warning}
964969
965 def product_uom_change(self, cursor, user, ids, pricelist, product, qty=0,970 def product_uom_change(self, cursor, user, ids, pricelist, product, qty=0,

Subscribers

People subscribed via source and target branches

to all changes: