Skip to content

Commit

Permalink
Merge pull request #437 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 May 5, 2024
2 parents 4f49744 + 98fd78b commit afcfa27
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
4 changes: 3 additions & 1 deletion dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@ FROM odoo:16
USER root

RUN pip3 install --no-cache-dir Pyjwt && \
echo "list_db = False" >> /etc/odoo/odoo.conf
echo "list_db = False" >> /etc/odoo/odoo.conf && \
echo "limit_time_cpu = 600" >> /etc/odoo/odoo.conf && \
echo "limit_time_real = 600" >> /etc/odoo/odoo.conf

USER odoo

Expand Down
11 changes: 6 additions & 5 deletions frepple/controllers/outbound.py
Original file line number Diff line number Diff line change
Expand Up @@ -817,7 +817,7 @@ def export_customers(self):
"res.partner",
search=[],
fields=["name", "parent_id", "is_company"],
order="id",
order="is_company desc, id",
):
if first:
yield "<!-- customers -->\n"
Expand All @@ -832,8 +832,9 @@ def export_customers(self):
yield "<customer name=%s/>\n" % quoteattr(name)
individual_inserted = True
else:
name = self.map_customers[i["parent_id"][0]]

name = self.map_customers.get(i["parent_id"][0], None)
if not name:
continue
self.map_customers[i["id"]] = name
if not first:
yield "</customers>\n"
Expand All @@ -847,12 +848,12 @@ def export_suppliers(self):
res.partner.id res.partner.name -> supplier.name
"""
first = True
for i in self.map_customers:
for i in self.map_customers.values():
if first:
yield "<!-- suppliers -->\n"
yield "<suppliers>\n"
first = False
yield "<supplier name=%s/>\n" % quoteattr(self.map_customers[i])
yield "<supplier name=%s/>\n" % quoteattr(i)
if not first:
yield "</suppliers>\n"

Expand Down

0 comments on commit afcfa27

Please sign in to comment.