diff options
| author | Joel Grand-Guillaume <joel.grandguillaume@camptocamp.com> | 2009-12-23 16:28:37 +0100 |
|---|---|---|
| committer | Joel Grand-Guillaume <joel.grandguillaume@camptocamp.com> | 2009-12-23 16:28:37 +0100 |
| commit | 0793892ca416afcb4b2e489d8eadcc8bfedd5580 (patch) | |
| tree | 393ac7f7d98e6f8921110f68d56ab21559e62557 | |
| parent | ffd766bd42301213e351d2b3a068ee3faf674211 (diff) | |
[IMP] Change the demo data according to last modification
bzr revid: joel.grandguillaume@camptocamp.com-20091223152837-b46zaj4iv1ua02jb
| -rw-r--r-- | addons/multi_company/multi_company_view.xml | 20 | ||||
| -rw-r--r-- | addons/multi_company/product.py | 33 |
2 files changed, 53 insertions, 0 deletions
diff --git a/addons/multi_company/multi_company_view.xml b/addons/multi_company/multi_company_view.xml new file mode 100644 index 00000000000..96a4695f576 --- /dev/null +++ b/addons/multi_company/multi_company_view.xml @@ -0,0 +1,20 @@ +<?xml version="1.0" encoding="utf-8"?> +<openerp> + <data> + + <record id="product_normal_form_view" model="ir.ui.view"> + <field name="name">product.normal.form</field> + <field name="model">product.product</field> + <field name="type">form</field> + <field name="inherit_id" ref="product.product_normal_form_view"/> + <field name="arch" type="xml"> + <field name="standard_price" attrs="{'readonly':[('cost_method','=','average')]}" position="after"> + <field name="standard_price_usd" attrs="{'readonly':[('cost_method','=','average')]}"/> + </field> + </field> + </record> + + + </data> +</openerp> + diff --git a/addons/multi_company/product.py b/addons/multi_company/product.py new file mode 100644 index 00000000000..988ef7ee39e --- /dev/null +++ b/addons/multi_company/product.py @@ -0,0 +1,33 @@ +# -*- coding: utf-8 -*- +############################################################################## +# +# OpenERP, Open Source Management Solution +# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see <http://www.gnu.org/licenses/>. +# +############################################################################## + +from osv import fields, osv +from tools import config + +class product_product(osv.osv): + _inherit = "product.product" + + _columns = { + 'standard_price_usd': fields.float('Cost Price USD', required=True, digits=(16, int(config['price_accuracy'])), + help="Product's cost in USDfor accounting stock valuation."), + } + +product_product()
\ No newline at end of file |
