[CLEAN] product and various: light model / code cleaning

Main changes summarized

product
- [REM] weight_net field. Weight net is removed from the product model.
Indeed a product should be modeled without its possible packaging data.
Moreover in the codebase the weight_net field is not really used.
- unused import
- removed _common.py file holding wrappers for tools (rouding and
ceiling), used only once in the codebase

purchase
- unused imports

purchase_requisition
- dead code
- purchase_requisition: from boolean to selection, because V > M

stock
- [REM] qty_available2, logic, loc_rack, loc_row, loc_case fields. location_id
and warehouse_id moved from the product to the template to ease the
configuration.
- [ADD] description_picking field

stock_account
- [REM] date_account field on stock.inventory

misc wording (sale_margin, ...), notably Cost Price renamed to Cost.
This commit is contained in:
Thibault Delavallée
2015-08-24 10:46:38 +02:00
parent a94da27d8e
commit cae29df7d9
23 changed files with 43 additions and 133 deletions
-3
View File
@@ -248,7 +248,6 @@
<field name="weight" class="oe_inline"/>
<field name="weight_uom_id" nolabel="1" class="oe_inline"/>
</div>
<field name="weight_net" groups="base.group_no_one"/>
<field name="number_of_packages"/>
</group>
</group>
@@ -284,7 +283,6 @@
<field name="arch" type="xml">
<xpath expr="//field[@name='date_expected']" position="after">
<field name="weight"/>
<field name="weight_net" groups="base.group_no_one"/>
</xpath>
</field>
</record>
@@ -301,7 +299,6 @@
<field name="weight" nolabel="1" class="oe_inline"/>
<field name="weight_uom_id" nolabel="1" class="oe_inline"/>
</div>
<field name="weight_net" groups="base.group_no_one"/>
</group>
</xpath>
</field>
+7 -35
View File
@@ -14,20 +14,9 @@ class stock_picking(osv.osv):
def _cal_weight(self, cr, uid, ids, name, args, context=None):
res = {}
for picking in self.browse(cr, uid, ids, context=context):
total_weight = total_weight_net = 0.00
for move in picking.move_lines:
if move.state != 'cancel':
total_weight += move.weight
total_weight_net += move.weight_net
res[picking.id] = {
'weight': total_weight,
'weight_net': total_weight_net,
}
res[picking.id] = sum(move.weight for move in picking.move_lines if move.state != 'cancel')
return res
def _get_picking_line(self, cr, uid, ids, context=None):
result = {}
for line in self.pool.get('stock.move').browse(cr, uid, ids, context=context):
@@ -38,12 +27,7 @@ class stock_picking(osv.osv):
_columns = {
'carrier_id':fields.many2one("delivery.carrier","Carrier"),
'volume': fields.float('Volume', copy=False),
'weight': fields.function(_cal_weight, type='float', string='Weight', digits_compute= dp.get_precision('Stock Weight'), multi='_cal_weight',
store={
'stock.picking': (lambda self, cr, uid, ids, c={}: ids, ['move_lines'], 40),
'stock.move': (_get_picking_line, ['state', 'picking_id', 'product_id','product_uom_qty','product_uom'], 40),
}),
'weight_net': fields.function(_cal_weight, type='float', string='Net Weight', digits_compute= dp.get_precision('Stock Weight'), multi='_cal_weight',
'weight': fields.function(_cal_weight, type='float', string='Weight', digits_compute= dp.get_precision('Stock Weight'),
store={
'stock.picking': (lambda self, cr, uid, ids, c={}: ids, ['move_lines'], 40),
'stock.move': (_get_picking_line, ['state', 'picking_id', 'product_id','product_uom_qty','product_uom'], 40),
@@ -93,6 +77,7 @@ class stock_picking(osv.osv):
fpos = picking.sale_id.fiscal_position_id
elif picking.partner_id:
fpos = partner.property_account_position_id
# TDE FIXME: spotted undefined variable
account_id = fpos_obj.map_account(cr, uid, fpos, account_id, context=context)
taxes_ids = fpos_obj.map_tax(cr, uid, fpos, taxes, context=context)
@@ -136,28 +121,15 @@ class stock_move(osv.osv):
def _cal_move_weight(self, cr, uid, ids, name, args, context=None):
res = {}
uom_obj = self.pool.get('product.uom')
for move in self.browse(cr, uid, ids, context=context):
weight = weight_net = 0.00
weight = 0.00
if move.product_id.weight > 0.00:
converted_qty = move.product_qty
weight = (converted_qty * move.product_id.weight)
if move.product_id.weight_net > 0.00:
weight_net = (converted_qty * move.product_id.weight_net)
res[move.id] = {
'weight': weight,
'weight_net': weight_net,
}
weight = move.product_qty * move.product_id.weight
res[move.id] = weight
return res
_columns = {
'weight': fields.function(_cal_move_weight, type='float', string='Weight', digits_compute= dp.get_precision('Stock Weight'), multi='_cal_move_weight',
store={
'stock.move': (lambda self, cr, uid, ids, c=None: ids, ['product_id', 'product_uom_qty', 'product_uom'], 30),
}),
'weight_net': fields.function(_cal_move_weight, type='float', string='Net weight', digits_compute= dp.get_precision('Stock Weight'), multi='_cal_move_weight',
'weight': fields.function(_cal_move_weight, type='float', string='Weight', digits_compute= dp.get_precision('Stock Weight'),
store={
'stock.move': (lambda self, cr, uid, ids, c=None: ids, ['product_id', 'product_uom_qty', 'product_uom'], 30),
}),
@@ -4,7 +4,7 @@
set a weight on ipod 16GB
-
!python {model: product.product, id: product.product_product_11}: |
self.write({'weight': 0.25, 'weight_net': 0.2})
self.write({'weight': 0.25})
-
create a SO with invoice before delivery
-
@@ -66,7 +66,6 @@
move = self.picking_ids.move_lines
assert move.product_qty == 2, 'wrong product_qty'
assert move.weight == 0.5, 'wrong move weight'
assert move.weight_net == 0.4, 'wrong move weight_net'
-
ship
-
+2 -2
View File
@@ -313,9 +313,9 @@ class xml_decl(osv.TransientModel):
if (not inv_line.uos_id.category_id
or not inv_line.product_id.uom_id.category_id
or inv_line.uos_id.category_id.id != inv_line.product_id.uom_id.category_id.id):
weight = inv_line.product_id.weight_net * inv_line.quantity
weight = inv_line.product_id.weight * inv_line.quantity
else:
weight = (inv_line.product_id.weight_net *
weight = (inv_line.product_id.weight *
inv_line.quantity * inv_line.uos_id.factor)
if (not inv_line.uos_id.category_id or not inv_line.product_id.uom_id.category_id
or inv_line.uos_id.category_id.id != inv_line.product_id.uom_id.category_id.id):
+4 -2
View File
@@ -10,7 +10,6 @@ from openerp.tools import DEFAULT_SERVER_DATE_FORMAT
from openerp.tools import float_compare, float_is_zero
from openerp.tools.translate import _
from openerp import tools, SUPERUSER_ID
from openerp.addons.product import _common
from openerp.exceptions import UserError, AccessError
@@ -276,7 +275,10 @@ class mrp_bom(osv.osv):
def _factor(factor, product_efficiency, product_rounding):
factor = factor / (product_efficiency or 1.0)
factor = _common.ceiling(factor, product_rounding)
if product_rounding:
factor = tools.float_round(factor,
precision_rounding=product_rounding,
rounding_method='UP')
if factor < product_rounding:
factor = product_rounding
return factor
-14
View File
@@ -1,14 +0,0 @@
# -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from openerp import tools
def rounding(f, r):
# TODO for trunk: log deprecation warning
# _logger.warning("Deprecated rounding method, please use tools.float_round to round floats.")
return tools.float_round(f, precision_rounding=r)
# TODO for trunk: add rounding method parameter to tools.float_round and use this method as hook
def ceiling(f, r):
if not r:
return f
return tools.float_round(f, precision_rounding=r, rounding_method='UP')
+2 -9
View File
@@ -1,11 +1,8 @@
# -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
import math
import re
import time
from _common import ceiling
from openerp import api, tools, SUPERUSER_ID
from openerp.osv import osv, fields, expression
@@ -478,8 +475,7 @@ class product_template(osv.osv):
help="Cost price of the product template used for standard stock valuation in accounting and used as a base price on purchase orders. "
"Expressed in the default unit of measure of the product..", groups="base.group_user", store=True),
'volume': fields.function(_compute_product_template_field, fnct_inv=_set_product_template_field, multi='_compute_product_template_field', type='float', string='Volume', help="The volume in m3.", store=True),
'weight': fields.function(_compute_product_template_field, fnct_inv=_set_product_template_field, multi='_compute_product_template_field', type='float', string='Gross Weight', digits_compute=dp.get_precision('Stock Weight'), help="The gross weight in Kg.", store=True),
'weight_net': fields.function(_compute_product_template_field, fnct_inv=_set_product_template_field, multi='_compute_product_template_field', type='float', string='Net Weight', digits_compute=dp.get_precision('Stock Weight'), help="The net weight in Kg.", store=True),
'weight': fields.function(_compute_product_template_field, fnct_inv=_set_product_template_field, multi='_compute_product_template_field', type='float', string='Gross Weight', digits_compute=dp.get_precision('Stock Weight'), help="The weight of the contents in Kg, not including any packaging, etc.", store=True),
'warranty': fields.float('Warranty'),
'sale_ok': fields.boolean('Can be Sold', help="Specify if the product can be selected in a sales order line."),
'pricelist_id': fields.dummy(string='Pricelist', relation='product.pricelist', type='many2one'),
@@ -693,8 +689,6 @@ class product_template(osv.osv):
related_vals['volume'] = vals['volume']
if vals.get('weight'):
related_vals['weight'] = vals['weight']
if vals.get('weight_net'):
related_vals['weight_net'] = vals['weight_net']
if related_vals:
self.write(cr, uid, product_template_id, related_vals, context=context)
@@ -952,8 +946,7 @@ class product_product(osv.osv):
"Expressed in the default unit of measure of the product.",
groups="base.group_user", string="Cost Price"),
'volume': fields.float('Volume', help="The volume in m3."),
'weight': fields.float('Gross Weight', digits_compute=dp.get_precision('Stock Weight'), help="The gross weight in Kg."),
'weight_net': fields.float('Net Weight', digits_compute=dp.get_precision('Stock Weight'), help="The net weight in Kg."),
'weight': fields.float('Gross Weight', digits_compute=dp.get_precision('Stock Weight'), help="The weight of the contents in Kg, not including any packaging, etc."),
}
_defaults = {
-4
View File
@@ -37,7 +37,6 @@
<field name="standard_price"/>
<field name="volume"/>
<field name="weight"/>
<field name="weight_net"/>
<field name="categ_id"/>
<field name="type"/>
<field name="state"/>
@@ -114,7 +113,6 @@
<group name="weight" string="Weights" attrs="{'invisible':['|', ('type','=','service'), ('product_variant_count','>',1)]}">
<field digits="(14, 3)" name="volume"/>
<field name="weight"/>
<field name="weight_net"/>
</group>
</group>
<group name="packaging" string="Packaging" attrs="{'invisible':[('type','=','service')]}" groups="product.group_stock_packaging" colspan="4">
@@ -252,7 +250,6 @@
<group name="weight" string="Weights">
<field digits="(14, 3)" name="volume"/>
<field digits="(14, 3)" name="weight"/>
<field digits="(14, 3)" name="weight_net"/>
</group>
</group>
</group>
@@ -453,7 +450,6 @@
<group name="weight" string="Weights" attrs="{'invisible':['|', ('type','=','service'), ('product_variant_count','=',1)]}">
<field digits="(14, 3)" name="volume"/>
<field digits="(14, 3)" name="weight"/>
<field digits="(14, 3)" name="weight_net"/>
</group>
</group>
<xpath expr="//div[@class='oe_title']" position="inside">
@@ -21,7 +21,6 @@
volume: 0.0
warranty: 0.0
weight: 0.0
weight_net: 0.0
-
Create an analytic journal for employees timesheet
-
+1 -3
View File
@@ -1,17 +1,15 @@
# -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
import pytz
from openerp import SUPERUSER_ID, workflow
from datetime import datetime
from dateutil.relativedelta import relativedelta
from operator import attrgetter
from openerp.tools.safe_eval import safe_eval as eval
from openerp.osv import fields, osv
from openerp.tools.translate import _
import openerp.addons.decimal_precision as dp
from openerp.osv.orm import browse_record_list, browse_record, browse_null
from openerp.tools import DEFAULT_SERVER_DATE_FORMAT, DEFAULT_SERVER_DATETIME_FORMAT, DATETIME_FORMATS_MAP
from openerp.tools import DEFAULT_SERVER_DATE_FORMAT, DEFAULT_SERVER_DATETIME_FORMAT
from openerp.tools.float_utils import float_compare
from openerp.exceptions import UserError
@@ -1,10 +1,8 @@
# -*- encoding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from datetime import datetime
from openerp.osv import fields, osv
from openerp.tools.translate import _
from openerp.tools import DEFAULT_SERVER_DATE_FORMAT, DEFAULT_SERVER_DATETIME_FORMAT
import openerp.addons.decimal_precision as dp
from openerp.exceptions import UserError
@@ -369,7 +367,16 @@ class product_template(osv.osv):
_inherit = 'product.template'
_columns = {
'purchase_requisition': fields.boolean('Call for Tenders', help="Check this box to generate Call for Tenders instead of generating requests for quotation from procurement.")
'purchase_requisition': fields.selection(
[('rfq', 'Create a draft purchase order'),
('tenders', 'Propose a call for tenders')],
string='Procurement',
help="Check this box to generate Call for Tenders instead of generating "
"requests for quotation from procurement."),
}
_defaults = {
'purchase_requisition': 'rfq',
}
@@ -386,7 +393,7 @@ class procurement_order(osv.osv):
res = {}
for procurement in self.browse(cr, uid, ids, context=context):
res[procurement.id] = False
if procurement.product_id.purchase_requisition:
if procurement.product_id.purchase_requisition == 'tenders':
warehouse_id = warehouse_obj.search(cr, uid, [('company_id', '=', procurement.company_id.id)], context=context)
requisition_id = requisition_obj.create(cr, uid, {
'origin': procurement.origin,
@@ -411,7 +418,7 @@ class procurement_order(osv.osv):
return res
def _check(self, cr, uid, procurement, context=None):
if procurement.rule_id and procurement.rule_id.action == 'buy' and procurement.product_id.purchase_requisition:
if procurement.rule_id and procurement.rule_id.action == 'buy' and procurement.product_id.purchase_requisition == 'tenders':
if procurement.requisition_id.state == 'done':
if any([purchase.shipped for purchase in procurement.requisition_id.purchase_ids]):
return True
@@ -7,7 +7,7 @@
</record>
<record id="product.product_product_13" model="product.product">
<field name="purchase_requisition" eval="True"/>
<field name="purchase_requisition">tenders</field>
</record>
<!--Resource: purchase.requisition-->
@@ -196,7 +196,7 @@
<field name="inherit_id" ref="stock.view_template_property_form"/>
<field name="arch" type="xml">
<field name="route_ids" position="after">
<field name="purchase_requisition"/>
<field name="purchase_requisition" widget="radio"/>
</field>
</field>
</record>
+2 -2
View File
@@ -70,8 +70,8 @@ class report_intrastat(osv.osv):
else 0
end) as value,
sum(
case when uom.category_id != puom.category_id then (pp.weight_net * inv_line.quantity)
else (pp.weight_net * inv_line.quantity * uom.factor) end
case when uom.category_id != puom.category_id then (pt.weight * inv_line.quantity)
else (pt.weight * inv_line.quantity * uom.factor) end
) as weight,
sum(
case when uom.category_id != puom.category_id then inv_line.quantity
+2 -2
View File
@@ -44,7 +44,7 @@ class sale_order_line(osv.osv):
_columns = {
'margin': fields.function(_product_margin, string='Margin', digits_compute= dp.get_precision('Product Price'),
store = True),
'purchase_price': fields.float('Cost Price', digits_compute= dp.get_precision('Product Price'))
'purchase_price': fields.float('Cost', digits_compute= dp.get_precision('Product Price'))
}
@@ -68,7 +68,7 @@ class sale_order(osv.osv):
return result.keys()
_columns = {
'margin': fields.function(_product_margin, string='Margin', help="It gives profitability by calculating the difference between the Unit Price and the cost price.", store={
'margin': fields.function(_product_margin, string='Margin', help="It gives profitability by calculating the difference between the Unit Price and the cost.", store={
'sale.order.line': (_get_order, ['margin', 'purchase_price'], 20),
'sale.order': (lambda self, cr, uid, ids, c={}: ids, ['order_line'], 20),
}, digits_compute= dp.get_precision('Product Price')),
+3 -8
View File
@@ -235,7 +235,6 @@ class product_product(osv.osv):
"or any of its children.\n"
"Otherwise, this includes goods stored in any Stock Location "
"with 'internal' type."),
'qty_available2': fields.related('qty_available', type="float", relation="product.product", string="On Hand"),
'virtual_available': fields.function(_product_available, multi='qty_available',
type='float', digits_compute=dp.get_precision('Product Unit of Measure'),
string='Forecast Quantity',
@@ -273,8 +272,6 @@ class product_product(osv.osv):
"any of its children.\n"
"Otherwise, this includes goods leaving any Stock "
"Location with 'internal' type."),
'location_id': fields.dummy(string='Location', relation='stock.location', type='many2one'),
'warehouse_id': fields.dummy(string='Warehouse', relation='stock.warehouse', type='many2one'),
'orderpoint_ids': fields.one2many('stock.warehouse.orderpoint', 'product_id', 'Minimum Stock Rules'),
'nbr_reordering_rules': fields.function(_compute_nbr_reordering_rules, string='Reordering Rules', type='integer', multi=True),
'reordering_min_qty': fields.function(_compute_nbr_reordering_rules, type='float', multi=True),
@@ -397,7 +394,6 @@ class product_template(osv.osv):
_columns = {
'type': fields.selection([('product', 'Stockable Product'), ('consu', 'Consumable'), ('service', 'Service')], 'Product Type', required=True, help="Consumable: Will not imply stock management for this product. \nStockable product: Will imply stock management for this product."),
'qty_available2': fields.related('qty_available', type="float", relation="product.template", string="On Hand"),
'property_stock_procurement': fields.property(
type='many2one',
relation='stock.location',
@@ -417,10 +413,8 @@ class product_template(osv.osv):
domain=[('usage','like','inventory')],
help="This stock location will be used, instead of the default one, as the source location for stock moves generated when you do an inventory."),
'sale_delay': fields.float('Customer Lead Time', help="The average delay in days between the confirmation of the customer order and the delivery of the finished products. It's the time you promise to your customers."),
'loc_rack': fields.char('Rack', size=16),
'loc_row': fields.char('Row', size=16),
'loc_case': fields.char('Case', size=16),
'tracking': fields.selection(selection=[('serial', 'By Unique Serial Number'), ('lot', 'By Lots'), ('none', 'No Tracking')], string="Tracking", required=True),
'description_picking': fields.text('Description on Picking', translate=True),
# sum of product variant qty
# 'reception_count': fields.function(_product_available, multi='qty_available',
# fnct_search=_search_product_quantity, type='float', string='Quantity On Hand'),
@@ -434,7 +428,8 @@ class product_template(osv.osv):
fnct_search=_search_product_quantity, type='float', string='Incoming'),
'outgoing_qty': fields.function(_product_available, multi='qty_available', digits_compute=dp.get_precision('Product Unit of Measure'),
fnct_search=_search_product_quantity, type='float', string='Outgoing'),
'location_id': fields.dummy(string='Location', relation='stock.location', type='many2one'),
'warehouse_id': fields.dummy(string='Warehouse', relation='stock.warehouse', type='many2one'),
'route_ids': fields.many2many('stock.location.route', 'stock_route_product', 'product_id', 'route_id', 'Routes', domain="[('product_selectable', '=', True)]",
help="Depending on the modules installed, this will allow you to define the route of the product: whether it will be bought, manufactured, MTO/MTS,..."),
'nbr_reordering_rules': fields.function(_compute_nbr_reordering_rules, string='Reordering Rules', type='integer', multi=True),
+2 -9
View File
@@ -126,13 +126,6 @@
<field name="virtual_available"/>
</group>
</group>
<group name="status" position="after">
<group name="store" string="Storage Location" attrs="{'invisible':[('type','=','service')]}">
<field name="loc_rack"/>
<field name="loc_row"/>
<field name="loc_case"/>
</group>
</group>
<group name="status" position="before">
<group name="lot" groups="stock.group_production_lot" string="Lots" attrs="{'invisible':[('type','=','service')]}">
<field name="tracking" on_change="onchange_tracking(tracking)" widget="radio"/>
@@ -224,7 +217,7 @@
name="%(product_open_quants)d"
icon="fa-building-o"
type="action" attrs="{'invisible':[('type', '=', 'service')]}" groups="stock.group_locations">
<field name="qty_available2" widget="statinfo"/>
<field name="qty_available" widget="statinfo"/>
</button>
<button class="oe_stat_button" name= "%(act_product_stock_move_open)d" type="action" attrs="{'invisible':[('type', '=', 'service')]}" string="Moves" groups="stock.group_stock_user" icon="fa-arrows-v"/>
<button class="oe_stat_button" name="%(product_open_orderpoint)d" type="action"
@@ -257,7 +250,7 @@
name="action_open_quants"
icon="fa-building-o"
type="object" attrs="{'invisible':[('type', '=', 'service')]}" groups="stock.group_locations">
<field name="qty_available2" widget="statinfo"/>
<field name="qty_available" widget="statinfo"/>
</button>
<button class="oe_stat_button" name= "action_view_stock_moves" type="object" attrs="{'invisible':[('type', '=', 'service')]}" string="Moves" groups="stock.group_stock_user" icon="fa-arrows-v"/>
<button class="oe_stat_button" name="action_view_orderpoints" type="object"
-2
View File
@@ -4338,7 +4338,6 @@ class stock_warehouse_orderpoint(osv.osv):
_columns = {
'name': fields.char('Name', required=True, copy=False),
'active': fields.boolean('Active', help="If the active field is set to False, it will allow you to hide the orderpoint without removing it."),
'logic': fields.selection([('max', 'Order to Max'), ('price', 'Best price (not yet active!)')], 'Reordering Mode', required=True),
'warehouse_id': fields.many2one('stock.warehouse', 'Warehouse', required=True, ondelete="cascade"),
'location_id': fields.many2one('stock.location', 'Location', required=True, ondelete="cascade"),
'product_id': fields.many2one('product.product', 'Product', required=True, ondelete='cascade', domain=[('type', '=', 'product')]),
@@ -4367,7 +4366,6 @@ class stock_warehouse_orderpoint(osv.osv):
'active': lambda *a: 1,
'lead_days': lambda *a: 1,
'lead_type': lambda *a: 'supplier',
'logic': lambda *a: 'max',
'qty_multiple': lambda *a: 1,
'name': lambda self, cr, uid, context: self.pool.get('ir.sequence').next_by_code(cr, uid, 'stock.orderpoint') or '',
'product_uom': lambda self, cr, uid, context: context.get('product_uom', False),
-14
View File
@@ -124,20 +124,6 @@ class account_invoice(osv.osv):
return invoice_data
class stock_inventory(osv.osv):
_inherit = "stock.inventory"
_columns = {
'date_account': fields.date('Force Valuation Account Date', help="Choose the accounting period where you want to value the stock moves created by the inventory instead of the default one (chosen by the inventory end date)"),
}
def post_inventory(self, cr, uid, inv, context=None):
if context is None:
context = {}
ctx = context.copy()
if inv.date:
ctx['force_period_date'] = inv.date
return super(stock_inventory, self).post_inventory(cr, uid, inv, context=ctx)
#----------------------------------------------------------
# Stock Location
#----------------------------------------------------------
+1 -1
View File
@@ -16,4 +16,4 @@
</record>
</data>
</openerp>
</openerp>
@@ -1,17 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<record id="view_inventory_form_inherit" model="ir.ui.view">
<field name="name">stock.inventory.form.inherit</field>
<field name="model">stock.inventory</field>
<field name="inherit_id" ref="stock.view_inventory_form"/>
<field name="arch" type="xml">
<xpath expr="//field[@name='date']" position="after">
<field name="date_account"/>
</xpath>
</field>
</record>
<record id="view_location_form_inherit" model="ir.ui.view">
<field name="name">stock.location.form.inherit</field>
<field name="model">stock.location</field>
@@ -8,7 +8,7 @@
<form string="Change Standard Price">
<separator string="Change Price"/>
<group>
<field name="new_price" string="Cost Price"/>
<field name="new_price" string="Cost"/>
</group>
<footer>
<button name="change_price" string="_Apply" type="object" class="btn-primary"/>
@@ -8,7 +8,7 @@ class wizard_valuation_history(osv.osv_memory):
_name = 'wizard.valuation.history'
_description = 'Wizard that opens the stock valuation history table'
_columns = {
'choose_date': fields.boolean('Choose a Particular Date'),
'choose_date': fields.boolean('Inventory at Date'),
'date': fields.datetime('Date', required=True),
}