diff --git a/addons/stock/stock.py b/addons/stock/stock.py index f74aa4c4452..fd466f8dfaf 100644 --- a/addons/stock/stock.py +++ b/addons/stock/stock.py @@ -3344,11 +3344,6 @@ class stock_location_path(osv.osv): 'location_from_id': fields.many2one('stock.location', 'Source Location', ondelete='cascade', select=1, required=True), 'location_dest_id': fields.many2one('stock.location', 'Destination Location', ondelete='cascade', select=1, required=True), 'delay': fields.integer('Delay (days)', help="Number of days to do this transition"), - 'invoice_state': fields.selection([ - ("invoiced", "Invoiced"), - ("2binvoiced", "To Be Invoiced"), - ("none", "Not Applicable")], "Invoice Status", - required=True,), 'picking_type_id': fields.many2one('stock.picking.type', 'Type of the new Operation', required=True, help="This is the picking type associated with the different pickings"), 'auto': fields.selection( [('auto','Automatic Move'), ('manual','Manual Operation'),('transparent','Automatic No Step Added')], @@ -3375,7 +3370,6 @@ class stock_location_path(osv.osv): _defaults = { 'auto': 'auto', 'delay': 0, - 'invoice_state': 'none', 'company_id': lambda self, cr, uid, c: self.pool.get('res.company')._company_default_get(cr, uid, 'procurement.order', context=c), 'propagate': True, 'active': True, diff --git a/addons/stock_account/stock.py b/addons/stock_account/stock.py index 0972be350e2..85ac0438848 100644 --- a/addons/stock_account/stock.py +++ b/addons/stock_account/stock.py @@ -21,6 +21,19 @@ from openerp.osv import fields, osv +class stock_location_path(osv.osv): + _inherit = "stock.location.path" + _columns = { + 'invoice_state': fields.selection([ + ("invoiced", "Invoiced"), + ("2binvoiced", "To Be Invoiced"), + ("none", "Not Applicable")], "Invoice Status", + required=True,), + } + _defaults = { + 'invoice_state': 'none', + } + #---------------------------------------------------------- # Procurement Rule #---------------------------------------------------------- @@ -31,8 +44,11 @@ class procurement_rule(osv.osv): ("invoiced", "Invoiced"), ("2binvoiced", "To Be Invoiced"), ("none", "Not Applicable")], "Invoice Status", - required=False), + required=True), } + _defaults = { + 'invoice_state': 'none', + } #---------------------------------------------------------- # Procurement Order diff --git a/addons/stock_account/stock_account_view.xml b/addons/stock_account/stock_account_view.xml index 64b6a89cea9..3b3ab37b212 100644 --- a/addons/stock_account/stock_account_view.xml +++ b/addons/stock_account/stock_account_view.xml @@ -61,5 +61,15 @@ + + stock.location.path.inherit.form + stock.location.path + + + + + + +