[IMP] stock: open stock.move.line when clicking on scrap smart button

Instead of stock.move.
This commit is contained in:
Pratima Gupta
2017-09-26 21:36:10 -07:00
committed by Joren Van Onder
parent 6e6e8f1cc4
commit a5de785969
2 changed files with 5 additions and 5 deletions
+3 -3
View File
@@ -119,7 +119,7 @@ class StockScrap(models.Model):
action['domain'] = [('id', '=', self.picking_id.id)]
return action
def action_get_stock_move(self):
action = self.env.ref('stock.stock_move_action').read([])[0]
action['domain'] = [('id', '=', self.move_id.id)]
def action_get_stock_move_lines(self):
action = self.env.ref('stock.stock_move_line_action').read([])[0]
action['domain'] = [('move_id', '=', self.move_id.id)]
return action
+2 -2
View File
@@ -33,8 +33,8 @@
string="Stock Operation" type="object"
attrs="{'invisible':[('picking_id','=',False)]}" icon="fa-cogs"/>
<field name="picking_id" invisible="1"/>
<button class="oe_stat_button" name="action_get_stock_move"
string="Inventory Move" type="object"
<button class="oe_stat_button" name="action_get_stock_move_lines"
string="Product Move" type="object"
attrs="{'invisible':[('move_id','=',False)]}" icon="fa-arrows-v"/>
<field name="move_id" invisible="1"/>
</div>