Browse Source

[IMP] point_of_sale_make_mrp.py

pull/301/head
Roberto Camejo 1 year ago
committed by GitHub
parent
commit
292c7d0d6a
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 5
      pos_mrp_order/models/point_of_sale_make_mrp.py

5
pos_mrp_order/models/point_of_sale_make_mrp.py

@ -98,6 +98,11 @@ class MrpProduction(models.Model):
'move_finished_ids': [ 'move_finished_ids': [
(0, 0, finished_vals)] (0, 0, finished_vals)]
}) })
# This piece of code gets the order done immediately
immediate_production = self.env['mrp.immediate.production'].sudo().create(
{'mo_ids': [(6, 0, mrp_order.ids)], 'immediate_production_line_ids': [
(0, 0, {'production_id': mrp_order.id, 'to_immediate': True})]}).process()
mrp_order.button_mark_done()
return True return True

Loading…
Cancel
Save