[ADD] stock_landed_costs : Added the new object for valuation adjustmensts.
bzr revid: mdi@tinyerp.com-20140409085258-aemcy9v57blbet2w
This commit is contained in:
parent
f146fe4d6a
commit
69940dc9ea
|
@ -49,6 +49,7 @@ class stock_landed_cost(osv.osv):
|
|||
'date': fields.datetime('Date', required=True),
|
||||
'picking_ids': fields.many2many('stock.picking', string='Pickings'),
|
||||
'cost_lines': fields.one2many('stock.landed.cost.lines', 'cost_id', 'Cost Lines'),
|
||||
'valuation_adjustment_lines': fields.one2many('stock.valuation.adjustment.lines', 'cost_id', 'Valuation Adjustments'),
|
||||
'description': fields.text('Item Description'),
|
||||
'amount_total': fields.function(_total_amount, type='float', string='Total', digits_compute=dp.get_precision('Account'),
|
||||
store={
|
||||
|
@ -109,4 +110,19 @@ class stock_landed_cost_lines(osv.osv):
|
|||
'split_method': 'equal',
|
||||
}
|
||||
|
||||
class stock_valuation_adjustment_lines(osv.osv):
|
||||
_name = 'stock.valuation.adjustment.lines'
|
||||
_description = 'Stock Valuation Adjustment Lines'
|
||||
|
||||
_columns = {
|
||||
'name': fields.char('Description', size=256),
|
||||
'cost_id': fields.many2one('stock.landed.cost', 'Landed Cost', required=True, ondelete='cascade'),
|
||||
'product_id': fields.many2one('product.product', 'Product', required=True),
|
||||
'quantity': fields.float('Quantity', digits_compute= dp.get_precision('Product Unit of Measure'), required=True),
|
||||
'former_cost': fields.float('Former Cost', required=True, digits_compute= dp.get_precision('Product Price')),
|
||||
'former_cost_per_unit': fields.float('Former Cost(Per Unit)', required=True, digits_compute= dp.get_precision('Product Price')),
|
||||
'additional_landed_cost': fields.float('Additional Landed Cost', required=True, digits_compute= dp.get_precision('Product Price')),
|
||||
'final_cost': fields.float('Final Cost', required=True, digits_compute= dp.get_precision('Product Price')),
|
||||
}
|
||||
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
<header>
|
||||
<button name="button_validate" string="Validate" states="draft" class="oe_highlight" type="object"/>
|
||||
<button name="button_cancel" string="Cancel" states="draft" type="object"/>
|
||||
<field name="state" widget="statusbar" statusbar_visible="draft,open" statusbar_colors='{"reject":"cancel"}'/>
|
||||
<field name="state" widget="statusbar" statusbar_visible="draft,open" statusbar_colors='{"cancel":"red"}'/>
|
||||
</header>
|
||||
<sheet>
|
||||
<div class="oe_title">
|
||||
|
@ -66,6 +66,33 @@
|
|||
<field name="amount_total"/>
|
||||
</group>
|
||||
</page>
|
||||
<page string="Valuation Adjustments">
|
||||
<field name="valuation_adjustment_lines">
|
||||
<form string="Valuation Adjustments" version="7.0">
|
||||
<group>
|
||||
<group>
|
||||
<field name="product_id"/>
|
||||
<field name="quantity"/>
|
||||
</group>
|
||||
<group>
|
||||
<field name="former_cost"/>
|
||||
<field name="additional_landed_cost"/>
|
||||
<field name="final_cost"/>
|
||||
</group>
|
||||
</group>
|
||||
</form>
|
||||
<tree string="Valuation Adjustments">
|
||||
<field name="product_id"/>
|
||||
<field name="quantity"/>
|
||||
<field name="former_cost"/>
|
||||
<field name="additional_landed_cost"/>
|
||||
<field name="final_cost"/>
|
||||
</tree>
|
||||
</field>
|
||||
<group class="oe_subtotal_footer oe_right">
|
||||
<field name="amount_total"/>
|
||||
</group>
|
||||
</page>
|
||||
</notebook>
|
||||
<div class="oe_clear">
|
||||
<label for="description"/>
|
||||
|
|
Loading…
Reference in New Issue