Merge lp:~openerp-dev/openobject-addons/7.0-opw-593424-dhr into lp:openobject-addons/7.0

Proposed by Dharti Ratani(OpenERP)
Status: Approved
Approved by: Naresh(OpenERP)
Approved revision: 9203
Proposed branch: lp:~openerp-dev/openobject-addons/7.0-opw-593424-dhr
Merge into: lp:openobject-addons/7.0
Diff against target: 37 lines (+3/-2)
3 files modified
product/product.py (+1/-1)
product/product_data.xml (+1/-0)
product/product_view.xml (+1/-1)
To merge this branch: bzr merge lp:~openerp-dev/openobject-addons/7.0-opw-593424-dhr
Reviewer Review Type Date Requested Status
Naresh(OpenERP) (community) Approve
Review via email: mp+168360@code.launchpad.net

This proposal supersedes a proposal from 2013-06-07.

Description of the change

Hello Sir,

Changed the code as per your suggestion : Changed the All products to be of view type as it is the parent of all product categories and set the default product category to be 'All Products/Salebale' in product.

Thanks
dhr

To post a comment you must log in.
Revision history for this message
Naresh(OpenERP) (nch-openerp) wrote : Posted in a previous version of this proposal

Hello Dharti,

The product category "product_category_all" defined in data file is of type 'Normal' and hence the changes related to this in your proposal is not needed.

Rest seems good !

Thanks,
Naresh Soni,
OpenERP Enterprise Services

review: Needs Fixing
Revision history for this message
Naresh(OpenERP) (nch-openerp) wrote : Posted in a previous version of this proposal

to fix we should first change the *product_category_all* type to view as it's defined as a parent category and should be of type view.

Revision history for this message
Naresh(OpenERP) (nch-openerp) wrote :

LGTM

review: Approve

Unmerged revisions

9203. By Dharti Ratani(OpenERP)

[IMP]

9202. By Dharti Ratani(OpenERP)

[IMP]Change the type of 'All Products' as view and set 'Sellable' As default product category

9201. By Dharti Ratani(OpenERP)

[FIX]Fixed the issue a product should not be added to a category with view type

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 2013-03-25 15:37:06 +0000
3+++ product/product.py 2013-06-10 06:55:50 +0000
4@@ -342,7 +342,7 @@
5 md = self.pool.get('ir.model.data')
6 res = False
7 try:
8- res = md.get_object_reference(cr, uid, 'product', 'product_category_all')[1]
9+ res = md.get_object_reference(cr, uid, 'product', 'product_category_1')[1]
10 except ValueError:
11 res = False
12 return res
13
14=== modified file 'product/product_data.xml'
15--- product/product_data.xml 2012-12-07 13:41:10 +0000
16+++ product/product_data.xml 2013-06-10 06:55:50 +0000
17@@ -6,6 +6,7 @@
18 -->
19 <record id="product_category_all" model="product.category">
20 <field name="name">All products</field>
21+ <field name="type">view</field>
22 </record>
23 <record id="product_category_1" model="product.category">
24 <field name="parent_id" ref="product_category_all"/>
25
26=== modified file 'product/product_view.xml'
27--- product/product_view.xml 2013-03-22 12:56:01 +0000
28+++ product/product_view.xml 2013-06-10 06:55:50 +0000
29@@ -67,7 +67,7 @@
30 <field name="name"/>
31 </h1>
32 <label for="categ_id" class="oe_edit_only"/>
33- <h2><field name="categ_id"/></h2>
34+ <h2><field name="categ_id" domain="[('type','!=','view')]"/></h2>
35 <div name="options" groups="base.group_user">
36 <field name="sale_ok"/>
37 <label for="sale_ok"/>