summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorQuentin (OpenERP) <qdp-launchpad@openerp.com>2014-04-22 14:41:13 +0200
committerQuentin (OpenERP) <qdp-launchpad@openerp.com>2014-04-22 14:41:13 +0200
commit5afa7d8aaff3c941fa98f43b281c9e7fdbaccf7d (patch)
treee5a211fd343d15958bb8d61146e30ad4da896e20
parent36b0c079c941136cd06c9f96a866060497c126ed (diff)
[REF] stock, stock_account: invoice_state field of push rule moved into the right module
bzr revid: qdp-launchpad@openerp.com-20140422124113-scgaooce0ofjawpk
-rw-r--r--addons/stock/stock.py6
-rw-r--r--addons/stock_account/stock.py18
-rw-r--r--addons/stock_account/stock_account_view.xml10
3 files changed, 27 insertions, 7 deletions
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 @@
</xpath>
</field>
</record>
+ <record model="ir.ui.view" id="view_pusht_rule_form_stockaccount_inherit">
+ <field name="name">stock.location.path.inherit.form</field>
+ <field name="model">stock.location.path</field>
+ <field name="inherit_id" ref="stock.stock_location_path_form"/>
+ <field name="arch" type="xml">
+ <xpath expr="//field[@name='picking_type_id']" position="after">
+ <field name="invoice_state"/>
+ </xpath>
+ </field>
+ </record>
</data>
</openerp>