Merge lp:~openerp-dev/openobject-addons/trunk-bug-1106050-cga into lp:openobject-addons

Proposed by Chandni Gandhi(OpenERP)
Status: Needs review
Proposed branch: lp:~openerp-dev/openobject-addons/trunk-bug-1106050-cga
Merge into: lp:openobject-addons
Diff against target: 12 lines (+1/-1)
1 file modified
project_long_term/project_long_term_view.xml (+1/-1)
To merge this branch: bzr merge lp:~openerp-dev/openobject-addons/trunk-bug-1106050-cga
Reviewer Review Type Date Requested Status
Ajay Patel (OpenERP) (community) Approve
OpenERP Core Team Pending
Review via email: mp+145778@code.launchpad.net

This proposal supersedes a proposal from 2013-01-28.

Description of the change

Hello,

Set the domain of uom in xml.

Thanks

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

Hello ,

we can not adopt static string in doamin at all like you did.
it just fail when translation happens or someone rename it.

may be alternate solution :

override fields_view_get and use xml identifire to construct valid domain.

Thanks,
Amit

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

Hello,

I think put this domain value "[('category_id','=',%(product.uom_categ_wtime)s)]".
because there is demo data for product_uom category..
so it works.

Thanks.

Revision history for this message
Ajay Patel (OpenERP) (ajay-openerp) wrote :

Hello,

Good. yes seems ok now.

i have one more remark.

can you please set default uom category when uom create from phaes ?

Thanks,
Amit

review: Needs Fixing
8524. By Chandni Gandhi(OpenERP)

[IMP]:Set default_category_id as Working time

Revision history for this message
Chandni Gandhi(OpenERP) (cga-openerp) wrote :

Hello,

I have improve the code as per suggestion.

Thanks
Chandni

Revision history for this message
Ajay Patel (OpenERP) (ajay-openerp) wrote :

Hello ,

No. you did wrong fix.

can you please try this one :

<field name="product_uom" class="oe_inline" domain="[('category_id','=',%(product.uom_categ_wtime)s)]" context="{'default_category_id':%(product.uom_categ_wtime)s}"/>

let me know it's working or not..;-)

Thanks,
Amit

review: Needs Fixing
8525. By Chandni Gandhi(OpenERP)

[IMP]:Set context value

Revision history for this message
Chandni Gandhi(OpenERP) (cga-openerp) wrote :

Hello,

Improve the cod as per suggestion.

Thanks.
Chandni.

Revision history for this message
Ajay Patel (OpenERP) (ajay-openerp) wrote :

Good.

review: Approve
8526. By Chandni Gandhi(OpenERP)

[MERGE]:With latest trunk

Unmerged revisions

8526. By Chandni Gandhi(OpenERP)

[MERGE]:With latest trunk

8525. By Chandni Gandhi(OpenERP)

[IMP]:Set context value

8524. By Chandni Gandhi(OpenERP)

[IMP]:Set default_category_id as Working time

8523. By Chandni Gandhi(OpenERP)

[IMP]:Set domain value of product_uom in xml

8522. By Chandni Gandhi(OpenERP)

[FIX]:Add category to Uom field for restriction

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'project_long_term/project_long_term_view.xml'
2--- project_long_term/project_long_term_view.xml 2012-12-19 06:48:44 +0000
3+++ project_long_term/project_long_term_view.xml 2013-02-08 11:25:23 +0000
4@@ -161,7 +161,7 @@
5 <div>
6 <div>
7 <field name="duration" class="oe_inline"/>
8- <field name="product_uom" class="oe_inline"/>
9+ <field name="product_uom" class="oe_inline" domain="[('category_id','=',%(product.uom_categ_wtime)s)]" context="{'default_category_id':%(product.uom_categ_wtime)s}"/>
10 </div>
11 <field name="date_start" class="oe_inline"/><label string=" - " class="oe_inline"/><field name="date_end" class="oe_inline"/>
12 </div>

Subscribers

People subscribed via source and target branches

to all changes: