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
1=== modified file 'stock/product.py'
2--- stock/product.py 2013-10-27 12:31:04 +0000
3+++ stock/product.py 2013-12-31 07:23:33 +0000
4@@ -471,6 +471,11 @@
5 res['fields']['qty_available']['string'] = _('Produced Qty')
6 return res
7
8+ def onchange_set_type(self, cr, uid, ids, type, context=None):
9+ val = {}
10+ if type == 'service':
11+ val['valuation'] ='manual_periodic'
12+ return {'value': val}
13
14 class product_template(osv.osv):
15 _name = 'product.template'
16
17=== modified file 'stock/product_view.xml'
18--- stock/product_view.xml 2013-11-27 15:32:57 +0000
19+++ stock/product_view.xml 2013-12-31 07:23:33 +0000
20@@ -170,10 +170,12 @@
21 </group>
22 <newline/>
23 </xpath>
24+ <xpath expr="//page[@string='Information']/group/group/field[@name='type']" position="attributes">
25+ <attribute name="on_change">onchange_set_type(type, context)</attribute>
26+ </xpath>
27 </field>
28 </record>
29
30-
31 <record id="action_receive_move" model="ir.actions.act_window">
32 <field name="name">Receptions</field>
33 <field name="res_model">stock.move</field>

Subscribers

People subscribed via source and target branches

to all changes: