Merge lp:~openerp-dev/openobject-addons/trunk-bug-1248135-ssh into lp:openobject-addons

Proposed by Sunil Sharma(OpenERP)
Status: Needs review
Proposed branch: lp:~openerp-dev/openobject-addons/trunk-bug-1248135-ssh
Merge into: lp:openobject-addons
Diff against target: 33 lines (+8/-1)
2 files modified
stock/product.py (+5/-0)
stock/product_view.xml (+3/-1)
To merge this branch: bzr merge lp:~openerp-dev/openobject-addons/trunk-bug-1248135-ssh
Reviewer Review Type Date Requested Status
OpenERP Core Team Pending
Review via email: mp+199779@code.launchpad.net

Description of the change

Hello,

       I have improve the onchange set type service valuation is periodic and product view in stock .

Thanks
Sunil Sharma

To post a comment you must log in.
9024. By Sunil Sharma(OpenERP)

[IMP]:improve code

9025. By Sunil Sharma(OpenERP)

[MRG]:lp:openobject-addons

Unmerged revisions

9025. By Sunil Sharma(OpenERP)

[MRG]:lp:openobject-addons

9024. By Sunil Sharma(OpenERP)

[IMP]:improve code

9023. By Sunil Sharma(OpenERP)

[IMP]:stock:onchange set type service valuation is periodic

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'stock/product.py'
--- stock/product.py 2013-10-27 12:31:04 +0000
+++ stock/product.py 2013-12-31 07:23:33 +0000
@@ -471,6 +471,11 @@
471 res['fields']['qty_available']['string'] = _('Produced Qty')471 res['fields']['qty_available']['string'] = _('Produced Qty')
472 return res472 return res
473473
474 def onchange_set_type(self, cr, uid, ids, type, context=None):
475 val = {}
476 if type == 'service':
477 val['valuation'] ='manual_periodic'
478 return {'value': val}
474479
475class product_template(osv.osv):480class product_template(osv.osv):
476 _name = 'product.template'481 _name = 'product.template'
477482
=== modified file 'stock/product_view.xml'
--- stock/product_view.xml 2013-11-27 15:32:57 +0000
+++ stock/product_view.xml 2013-12-31 07:23:33 +0000
@@ -170,10 +170,12 @@
170 </group>170 </group>
171 <newline/>171 <newline/>
172 </xpath>172 </xpath>
173 <xpath expr="//page[@string='Information']/group/group/field[@name='type']" position="attributes">
174 <attribute name="on_change">onchange_set_type(type, context)</attribute>
175 </xpath>
173 </field>176 </field>
174 </record>177 </record>
175178
176
177 <record id="action_receive_move" model="ir.actions.act_window">179 <record id="action_receive_move" model="ir.actions.act_window">
178 <field name="name">Receptions</field>180 <field name="name">Receptions</field>
179 <field name="res_model">stock.move</field>181 <field name="res_model">stock.move</field>

Subscribers

People subscribed via source and target branches

to all changes: