[IMP] - order creation is taking now in account the package creation with barcode config

[FIX] - context in actions of inventory move view
This commit is contained in:
Mathieu VATEL
2012-05-22 17:47:41 +02:00
parent 47ef7d5109
commit 2b171b269c
2 changed files with 4 additions and 3 deletions

View File

@@ -41,7 +41,7 @@
</record>
<record id="stock.action_inventory_form" model="ir.actions.act_window">
<field name="context">{'full':'1', 'type':'normal'}</field>
<field name="context">{'full':'1', 'type':'normal', 'default_type': 'normal'}</field>
<field name="domain">[('type', '=', 'normal')]</field>
</record>
@@ -55,7 +55,7 @@
<field name="res_model">stock.inventory</field>
<field name="view_type">form</field>
<field name="view_id" ref="stock.view_inventory_tree"/>
<field name="context">{'full':'1', 'type':'move'}</field>
<field name="context">{'full':'1', 'type':'move', 'default_type': 'move'}</field>
<field name="domain">[('type', '=', 'move')]</field>
<field name="search_view_id" ref="stock.view_inventory_filter" />
<field name="help">You can use this to move a stock from a location to an other one.</field>

View File

@@ -100,6 +100,7 @@ class stock_tracking(osv.osv):
_defaults = {
'state': 'open',
'location_id': lambda x, y, z, c: c and c.get('location_id') or False,
}
def reset_open(self, cr, uid, ids, context=None):
@@ -292,7 +293,7 @@ class stock_move(osv.osv):
state = self.browse(cr, uid, id, context).state
move_ori_id = self.browse(cr, uid, id, context).move_ori_id
if state == 'done' and move_ori_id:
self.write(cr, uid, [move_ori_id], {'state':'done'}, context)
self.write(cr, uid, [move_ori_id.id], {'state':'done'}, context)
return result
def create(self, cr, uid, vals, context=None):