diff --git a/addons/stock_landed_costs/__openerp__.py b/addons/stock_landed_costs/__openerp__.py index bcc1ef6009b..d3bbada4a52 100644 --- a/addons/stock_landed_costs/__openerp__.py +++ b/addons/stock_landed_costs/__openerp__.py @@ -38,6 +38,7 @@ ], 'data': [ 'security/ir.model.access.csv', + 'stock_landed_costs_sequence.xml', 'product_view.xml', 'stock_landed_costs_view.xml', 'stock_landed_costs_data.xml', diff --git a/addons/stock_landed_costs/product_view.xml b/addons/stock_landed_costs/product_view.xml index 522b93b7d89..f3db15854af 100644 --- a/addons/stock_landed_costs/product_view.xml +++ b/addons/stock_landed_costs/product_view.xml @@ -12,8 +12,7 @@ - - + diff --git a/addons/stock_landed_costs/stock_landed_costs.py b/addons/stock_landed_costs/stock_landed_costs.py index 4736b9bb92c..a2a4d099a25 100644 --- a/addons/stock_landed_costs/stock_landed_costs.py +++ b/addons/stock_landed_costs/stock_landed_costs.py @@ -82,7 +82,7 @@ class stock_landed_cost(osv.osv): return {'value': result} _columns = { - 'name': fields.char('Name', size=256, required=True, states={'done': [('readonly', True)]}, track_visibility='always'), + 'name': fields.char('Name', size=256, track_visibility='always', readonly=True), 'date': fields.date('Date', required=True, states={'done': [('readonly', True)]}, track_visibility='onchange'), 'picking_ids': fields.many2many('stock.picking', string='Pickings', states={'done': [('readonly', True)]}), 'cost_lines': fields.one2many('stock.landed.cost.lines', 'cost_id', 'Cost Lines', states={'done': [('readonly', True)]}), @@ -100,6 +100,7 @@ class stock_landed_cost(osv.osv): } _defaults = { + 'name': lambda obj, cr, uid, context: obj.pool.get('ir.sequence').get(cr, uid, 'stock.landed.cost'), 'state': 'draft', 'date': fields.date.context_today, } diff --git a/addons/stock_landed_costs/stock_landed_costs_sequence.xml b/addons/stock_landed_costs/stock_landed_costs_sequence.xml new file mode 100644 index 00000000000..9c305483d94 --- /dev/null +++ b/addons/stock_landed_costs/stock_landed_costs_sequence.xml @@ -0,0 +1,16 @@ + + + + + Stock Landed Costs + stock.landed.cost + + + Stock Landed Costs + stock.landed.cost + LC/%(year)s/ + 4 + + + + diff --git a/addons/stock_landed_costs/stock_landed_costs_view.xml b/addons/stock_landed_costs/stock_landed_costs_view.xml index d1165f6e6c6..de6f3710a71 100644 --- a/addons/stock_landed_costs/stock_landed_costs_view.xml +++ b/addons/stock_landed_costs/stock_landed_costs_view.xml @@ -158,5 +158,144 @@ + + + stock.landed.cost.type.form + product.product + + + + + + + + + + + + + + + - + + + + Generic product settings are managed on + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + product.product.tree + product.product + + + + + + + + + + + Products + ir.actions.act_window + product.product + [('landed_cost_ok','=',True)] + form + tree,form + {'default_landed_cost_ok': True} + + + + Click to define a new product. + + You must define a product for everything you buy or sell, + whether it's a physical product, a consumable or service. + + + + + + + tree + + + + + + + form + + + + + +
Generic product settings are managed on + +
+ Click to define a new product. +
+ You must define a product for everything you buy or sell, + whether it's a physical product, a consumable or service. +