[IMP] Change the demo data according to last modification

bzr revid: joel.grandguillaume@camptocamp.com-20091223152837-b46zaj4iv1ua02jb
This commit is contained in:
Joel Grand-Guillaume 2009-12-23 16:28:37 +01:00
parent ffd766bd42
commit 0793892ca4
2 changed files with 53 additions and 0 deletions

View File

@ -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>

View File

@ -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()