Merge lp:~vauxoo/addons-vauxoo/mrp_bom_standard_price into lp:addons-vauxoo

Proposed by Juan Carlos Hernandez
Status: Merged
Merged at revision: 502
Proposed branch: lp:~vauxoo/addons-vauxoo/mrp_bom_standard_price
Merge into: lp:addons-vauxoo
Diff against target: 135 lines (+115/-0)
4 files modified
mrp_bom_standard_price/__init__.py (+23/-0)
mrp_bom_standard_price/__openerp__.py (+41/-0)
mrp_bom_standard_price/mrp_bom.py (+33/-0)
mrp_bom_standard_price/mrp_bom_view.xml (+18/-0)
To merge this branch: bzr merge lp:~vauxoo/addons-vauxoo/mrp_bom_standard_price
Reviewer Review Type Date Requested Status
Luis Torres - http://www.vauxoo.com Needs Resubmitting
Isaac López Zúñiga Pending
Moisés López - http://www.vauxoo.com Pending
Review via email: mp+128145@code.launchpad.net

Description of the change

Herede campo standard price en vista tree en LDM

To post a comment you must log in.
496. By Luis Torres - http://www.vauxoo.com

[IMP]Change position of field in view

Revision history for this message
Luis Torres - http://www.vauxoo.com (luis-cleto-) wrote :

Se cambio de posicion el campo heredado

review: Needs Resubmitting

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== added directory 'mrp_bom_standard_price'
2=== added file 'mrp_bom_standard_price/__init__.py'
3--- mrp_bom_standard_price/__init__.py 1970-01-01 00:00:00 +0000
4+++ mrp_bom_standard_price/__init__.py 2012-10-05 23:38:20 +0000
5@@ -0,0 +1,23 @@
6+#!/usr/bin/python
7+# -*- encoding: utf-8 -*-
8+###########################################################################
9+# Module Writen to OpenERP, Open Source Management Solution
10+# Copyright (C) Vauxoo (<http://vauxoo.com>).
11+# All Rights Reserved
12+###############Credits######################################################
13+# Coded by: Juan Carlos Funes(juan@vauxoo.com)
14+#############################################################################
15+# This program is free software: you can redistribute it and/or modify
16+# it under the terms of the GNU Affero General Public License as published by
17+# the Free Software Foundation, either version 3 of the License, or
18+# (at your option) any later version.
19+#
20+# This program is distributed in the hope that it will be useful,
21+# but WITHOUT ANY WARRANTY; without even the implied warranty of
22+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
23+# GNU Affero General Public License for more details.
24+#
25+# You should have received a copy of the GNU Affero General Public License
26+# along with this program. If not, see <http://www.gnu.org/licenses/>.
27+################################################################################
28+import mrp_bom
29
30=== added file 'mrp_bom_standard_price/__openerp__.py'
31--- mrp_bom_standard_price/__openerp__.py 1970-01-01 00:00:00 +0000
32+++ mrp_bom_standard_price/__openerp__.py 2012-10-05 23:38:20 +0000
33@@ -0,0 +1,41 @@
34+#!/usr/bin/python
35+# -*- encoding: utf-8 -*-
36+###########################################################################
37+# Module Writen to OpenERP, Open Source Management Solution
38+# Copyright (C) Vauxoo (<http://vauxoo.com>).
39+# All Rights Reserved
40+###############Credits######################################################
41+# Coded by: Juan Carlos Funes(juan@vauxoo.com)
42+#############################################################################
43+# This program is free software: you can redistribute it and/or modify
44+# it under the terms of the GNU Affero General Public License as published by
45+# the Free Software Foundation, either version 3 of the License, or
46+# (at your option) any later version.
47+#
48+# This program is distributed in the hope that it will be useful,
49+# but WITHOUT ANY WARRANTY; without even the implied warranty of
50+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
51+# GNU Affero General Public License for more details.
52+#
53+# You should have received a copy of the GNU Affero General Public License
54+# along with this program. If not, see <http://www.gnu.org/licenses/>.
55+################################################################################
56+{
57+ "name" : "This module inherits standard price field in mrp.bom",
58+ "version" : "1.0",
59+ "depends" : ['product','mrp'],
60+ "author" : "Vauxoo",
61+ #"license" : "AGPL-3",
62+ "description" : """This module inherits standard price field in mrp.bom
63+ """,
64+ "website" : "http://vauxoo.com",
65+ "category" : "Generic Modules",
66+ "init_xml" : [],
67+ "demo_xml" : [],
68+ "test": [],
69+ "update_xml" : ['mrp_bom_view.xml',
70+ ],
71+ "active": False,
72+ "installable": True,
73+}
74+
75
76=== added file 'mrp_bom_standard_price/mrp_bom.py'
77--- mrp_bom_standard_price/mrp_bom.py 1970-01-01 00:00:00 +0000
78+++ mrp_bom_standard_price/mrp_bom.py 2012-10-05 23:38:20 +0000
79@@ -0,0 +1,33 @@
80+#!/usr/bin/python
81+# -*- encoding: utf-8 -*-
82+###########################################################################
83+# Module Writen to OpenERP, Open Source Management Solution
84+# Copyright (C) Vauxoo (<http://vauxoo.com>).
85+# All Rights Reserved
86+###############Credits######################################################
87+# Coded by: Juan Carlos Funes(juan@vauxoo.com)
88+#############################################################################
89+# This program is free software: you can redistribute it and/or modify
90+# it under the terms of the GNU Affero General Public License as published by
91+# the Free Software Foundation, either version 3 of the License, or
92+# (at your option) any later version.
93+#
94+# This program is distributed in the hope that it will be useful,
95+# but WITHOUT ANY WARRANTY; without even the implied warranty of
96+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
97+# GNU Affero General Public License for more details.
98+#
99+# You should have received a copy of the GNU Affero General Public License
100+# along with this program. If not, see <http://www.gnu.org/licenses/>.
101+################################################################################
102+from tools.translate import _
103+from osv import fields, osv
104+
105+class mrp_bom(osv.osv):
106+ _inherit = 'mrp.bom'
107+
108+ _columns = {
109+ 'standard_price': fields.related('product_id', 'standard_price', type='float', relation='product.template', string='Cost price', store=True),
110+ }
111+mrp_bom()
112+
113
114=== added file 'mrp_bom_standard_price/mrp_bom_view.xml'
115--- mrp_bom_standard_price/mrp_bom_view.xml 1970-01-01 00:00:00 +0000
116+++ mrp_bom_standard_price/mrp_bom_view.xml 2012-10-05 23:38:20 +0000
117@@ -0,0 +1,18 @@
118+<?xml version="1.0" encoding="utf-8"?>
119+<openerp>
120+ <data>
121+
122+ <record id="view_mrp_bom_inh" model="ir.ui.view">
123+ <field name="name">mrp.bom.inh</field>
124+ <field name="model">mrp.bom</field>
125+ <field name="type">tree</field>
126+ <field name="inherit_id" ref="mrp.mrp_bom_component_tree_view"/>
127+ <field name="arch" type="xml">
128+ <xpath expr="/tree/field[@name='type']" position="before">
129+ <field name="standard_price"/>
130+ </xpath>
131+ </field>
132+ </record>
133+
134+ </data>
135+</openerp>