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
=== modified file 'product/product.py'
--- product/product.py 2013-03-25 15:37:06 +0000
+++ product/product.py 2013-06-10 06:55:50 +0000
@@ -342,7 +342,7 @@
342 md = self.pool.get('ir.model.data')342 md = self.pool.get('ir.model.data')
343 res = False343 res = False
344 try:344 try:
345 res = md.get_object_reference(cr, uid, 'product', 'product_category_all')[1]345 res = md.get_object_reference(cr, uid, 'product', 'product_category_1')[1]
346 except ValueError:346 except ValueError:
347 res = False347 res = False
348 return res348 return res
349349
=== modified file 'product/product_data.xml'
--- product/product_data.xml 2012-12-07 13:41:10 +0000
+++ product/product_data.xml 2013-06-10 06:55:50 +0000
@@ -6,6 +6,7 @@
6 -->6 -->
7 <record id="product_category_all" model="product.category">7 <record id="product_category_all" model="product.category">
8 <field name="name">All products</field>8 <field name="name">All products</field>
9 <field name="type">view</field>
9 </record>10 </record>
10 <record id="product_category_1" model="product.category">11 <record id="product_category_1" model="product.category">
11 <field name="parent_id" ref="product_category_all"/>12 <field name="parent_id" ref="product_category_all"/>
1213
=== modified file 'product/product_view.xml'
--- product/product_view.xml 2013-03-22 12:56:01 +0000
+++ product/product_view.xml 2013-06-10 06:55:50 +0000
@@ -67,7 +67,7 @@
67 <field name="name"/>67 <field name="name"/>
68 </h1>68 </h1>
69 <label for="categ_id" class="oe_edit_only"/>69 <label for="categ_id" class="oe_edit_only"/>
70 <h2><field name="categ_id"/></h2>70 <h2><field name="categ_id" domain="[('type','!=','view')]"/></h2>
71 <div name="options" groups="base.group_user">71 <div name="options" groups="base.group_user">
72 <field name="sale_ok"/>72 <field name="sale_ok"/>
73 <label for="sale_ok"/>73 <label for="sale_ok"/>