Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @staticmethod
- def order_estimated_time_delivery(tables):
- pool = Pool()
- ShippingMode = pool.get('shipping.mode')
- table, _ = tables[None]
- if 'shipping_mode' not in tables:
- shipping_mode = ShippingMode.__table__()
- tables['shipping_mode'] = {
- None: (shipping_mode, table.shipping_mode == shipping_mode.id),
- }
- else:
- shipping_mode = tables['shipping_mode']
- return [Case(
- (table.planned_date == Null, Null),
- else_=Case(
- (table.shipping_mode == Null, table.planned_date),
- else_=(table.planned_date - shipping_mode.lead_time),
- ),
- )]
Add Comment
Please, Sign In to add comment