Skip to content

Commit

Permalink
[IMP] sale_order_type_automation: Improve the automatation for produc…
Browse files Browse the repository at this point in the history
…t like service. (ingadhoc#224)
  • Loading branch information
nicomacr authored and jjscarafia committed May 13, 2019
1 parent b4d5a82 commit bf45a53
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions sale_order_type_automation/models/sale_order.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,14 @@ def run_invoicing_atomation(self):

@api.multi
def run_picking_atomation(self):
# If there products are the type 'service' equals the
# delivered qyt to order qty for this sale order line
for order_lines in self.mapped('order_line').filtered(
lambda x: x.order_id.type_id.picking_atomation !=
'none' and x.product_id.type ==
'service' and x.product_id.service_type ==
'manual' and x.product_id.expense_policy == 'no'):
order_lines.qty_delivered = order_lines.product_uom_qty
for rec in self.filtered(
lambda x: x.type_id.picking_atomation != 'none' and
x.procurement_group_id):
Expand Down

0 comments on commit bf45a53

Please sign in to comment.