Skip to content

Commit

Permalink
Merge pull request #415 from frePPLe/16.0
Browse files Browse the repository at this point in the history
Syncing from upstream frePPLe/odoo (16.0)
  • Loading branch information
bt-admin authored Feb 17, 2024
2 parents 966df59 + 104e8e7 commit ae4476f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
7 changes: 5 additions & 2 deletions frepple/controllers/inbound.py
Original file line number Diff line number Diff line change
Expand Up @@ -551,11 +551,15 @@ def run(self):
"origin": "frePPLe",
}
)
# Remember odoo name for the MO reference passed by frepple.
# This mapping is later used when importing WO.
mo_references[elem.get("reference")] = mo
mo._onchange_product_qty()
mo._onchange_workorder_ids()
mo._onchange_move_raw()
mo._create_update_move_finished()
# mo.action_confirm() # confirm MO
# mo._plan_workorders() # plan MO
# mo.action_assign() # reserve material
else:
# MO update
mo = mfg_order.with_context(context).search(
Expand All @@ -580,7 +584,6 @@ def run(self):
)
mo_references[elem.get("reference")] = mo


# Process the workorder information we received
if wo_data:
for wo in mo.workorder_ids:
Expand Down
5 changes: 4 additions & 1 deletion frepple/controllers/outbound.py
Original file line number Diff line number Diff line change
Expand Up @@ -1138,7 +1138,10 @@ def export_items(self):
)
suppliers = {}
for sup in results:
name = self.map_customers.get(sup["partner_id"][0])
name = self.map_customers.get(sup["partner_id"][0], None)
if not name:
# Skip uninterested suppliers (eg archived ones)
continue
if sup.get("is_subcontractor", False):
if not hasattr(tmpl, "subcontractors"):
tmpl["subcontractors"] = []
Expand Down

0 comments on commit ae4476f

Please sign in to comment.