mirror of
https://github.com/bringout/oca-technical.git
synced 2026-04-20 23:32:00 +02:00
Initial commit: OCA Technical packages (595 packages)
This commit is contained in:
commit
2cc02aac6e
24950 changed files with 2318079 additions and 0 deletions
20
odoo-bringout-oca-ddmrp-ddmrp/ddmrp/models/stock_picking.py
Normal file
20
odoo-bringout-oca-ddmrp-ddmrp/ddmrp/models/stock_picking.py
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
# Copyright 2020 Camptocamp SA
|
||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html)
|
||||
|
||||
from odoo import models
|
||||
|
||||
|
||||
class StockPicking(models.Model):
|
||||
_inherit = "stock.picking"
|
||||
|
||||
def action_stock_buffer_open(self):
|
||||
"""Open a stock.buffer list related to products of the stock.picking."""
|
||||
self.ensure_one()
|
||||
domain = [
|
||||
("product_id", "in", self.mapped("move_ids.product_id.id")),
|
||||
("company_id", "=", self.company_id.id),
|
||||
]
|
||||
action = self.env["ir.actions.actions"]._for_xml_id("ddmrp.action_stock_buffer")
|
||||
action["domain"] = domain
|
||||
action["context"] = {"search_default_procure_recommended": 1}
|
||||
return action
|
||||
Loading…
Add table
Add a link
Reference in a new issue