18 lines
567 B
Python
18 lines
567 B
Python
from odoo import models
|
|
|
|
|
|
class SaleOrder(models.Model):
|
|
_name = 'sale.order'
|
|
_inherit = ["sale.order", "directive.mixin"]
|
|
|
|
def action_wms_response(self, payload: dict):
|
|
for order in self:
|
|
bin_location = "ZONE-A-ROW-5"
|
|
|
|
order.message_post(
|
|
body=f"WMS Агент: Товар зарезервирован.<br/>"
|
|
f"Ячейка: {bin_location}<br/>"
|
|
f"Директива #{payload.get('directive_id')} закрыта успешно."
|
|
)
|
|
|
|
return True |