[IMP] stock: open stock.move.line when clicking on scrap smart button
Instead of stock.move.
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user