Public release from ruodoo-project: 19.0 - 2026-07-26 21:17:35 UTC
This commit is contained in:
26
directive_test/models/stock_picking.py
Normal file
26
directive_test/models/stock_picking.py
Normal file
@ -0,0 +1,26 @@
|
||||
from odoo import models, fields
|
||||
|
||||
class StockPicking(models.Model):
|
||||
_name = 'stock.picking'
|
||||
_inherit = ["stock.picking", "directive.mixin"]
|
||||
|
||||
def _directive_generation_spec(self):
|
||||
return [
|
||||
{
|
||||
"event": "on_callback",
|
||||
"callback": "button_validate",
|
||||
"mode": "create_once",
|
||||
"when": "after",
|
||||
"if_result": True,
|
||||
"use_record_template_group": True,
|
||||
"key": "picking_done_check_finance",
|
||||
}
|
||||
]
|
||||
|
||||
def action_agv_callback(self, payload: dict):
|
||||
for picking in self:
|
||||
picking.message_post(
|
||||
body=f"AGV Unit 01: Доставка в зону производства выполнена."
|
||||
f"Батарея: 84%."
|
||||
)
|
||||
return True
|
||||
Reference in New Issue
Block a user