mirror of
https://github.com/bringout/oca-ocb-sale.git
synced 2026-04-28 02:12:00 +02:00
Initial commit: Sale packages
This commit is contained in:
commit
14e3d26998
6469 changed files with 2479670 additions and 0 deletions
|
|
@ -0,0 +1,16 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
# Part of Odoo. See LICENSE file for full copyright and licensing details.
|
||||
|
||||
from odoo import api, fields, models
|
||||
|
||||
|
||||
class SaleOrderCancel(models.TransientModel):
|
||||
_inherit = 'sale.order.cancel'
|
||||
|
||||
display_delivery_alert = fields.Boolean('Delivery Alert', compute='_compute_display_delivery_alert')
|
||||
|
||||
@api.depends('order_id')
|
||||
def _compute_display_delivery_alert(self):
|
||||
for wizard in self:
|
||||
out_pickings = wizard.order_id.picking_ids.filtered(lambda p: p.picking_type_code == 'outgoing')
|
||||
wizard.display_delivery_alert = bool(any(picking.state == 'done' for picking in out_pickings))
|
||||
Loading…
Add table
Add a link
Reference in a new issue