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
1=== modified file 'product/product.py'
2--- product/product.py 2012-12-18 22:06:17 +0000
3+++ product/product.py 2013-02-13 05:59:22 +0000
4@@ -363,7 +363,7 @@
5
6 _defaults = {
7 'company_id': lambda s,cr,uid,c: s.pool.get('res.company')._company_default_get(cr, uid, 'product.template', context=c),
8- 'list_price': 1,
9+ 'list_price': 0,
10 'cost_method': 'standard',
11 'standard_price': 0.0,
12 'sale_ok': 1,
13
14=== modified file 'purchase/purchase.py'
15--- purchase/purchase.py 2012-12-21 16:48:08 +0000
16+++ purchase/purchase.py 2013-02-13 05:59:22 +0000
17@@ -975,6 +975,10 @@
18 taxes = account_tax.browse(cr, uid, map(lambda x: x.id, product.supplier_taxes_id))
19 fpos = fiscal_position_id and account_fiscal_position.browse(cr, uid, fiscal_position_id, context=context) or False
20 taxes_ids = account_fiscal_position.map_tax(cr, uid, fpos, taxes)
21+
22+ if product.list_price == 0:
23+ price = price_unit
24+
25 res['value'].update({'price_unit': price, 'taxes_id': taxes_ids})
26
27 return res
28
29=== modified file 'sale/sale.py'
30--- sale/sale.py 2013-01-31 18:43:56 +0000
31+++ sale/sale.py 2013-02-13 05:59:22 +0000
32@@ -960,6 +960,11 @@
33 'title': _('Configuration Error!'),
34 'message' : warning_msgs
35 }
36+
37+ record = self.browse(cr, uid, ids, context=context)
38+ if record and product_obj.list_price == 0:
39+ result.update({'price_unit': record[0].price_unit})
40+
41 return {'value': result, 'domain': domain, 'warning': warning}
42
43 def product_uom_change(self, cursor, user, ids, pricelist, product, qty=0,

Subscribers

People subscribed via source and target branches

to all changes: