Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[14.0][ADD] sale_order_*requested_delivery_period #29

Open
wants to merge 2 commits into
base: 14.0
Choose a base branch
from

Conversation

thienvh332
Copy link
Owner

No description provided.

@thienvh332 thienvh332 marked this pull request as ready for review August 9, 2024 03:55
@thienvh332 thienvh332 force-pushed the 14.0-add-sale_order_import_delivery_period branch from 279994e to 4c013b2 Compare August 9, 2024 04:03
@thienvh332 thienvh332 force-pushed the 14.0-add-sale_order_import_delivery_period branch from 4c013b2 to a7604f3 Compare August 9, 2024 04:15
@thienvh332 thienvh332 force-pushed the 14.0-add-sale_order_import_delivery_period branch from a7604f3 to ed9335c Compare August 9, 2024 04:20
@thienvh332 thienvh332 changed the title [14.0][ADD] add new module sale_order_*delivery_period [14.0][ADD] sale_order_*requested_delivery_period Aug 9, 2024
wiz = self.env["sale.order.import"].create(
{"order_file": base64.b64encode(xml_file), "order_filename": filename}
)
f.close()

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
f.close()

when run out with, f will be closed

self.assertEqual(so.customer_order_number, res["client_order_ref"])
self.assertEqual(so.customer_order_free_ref, "MrBlue")
self.assertEqual(
so.client_order_ref, res["client_order_ref"] + " - MrBlue"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
so.client_order_ref, res["client_order_ref"] + " - MrBlue"
so.client_order_ref, res["client_order_ref"] + f" - {customer_reference}"

if res.get("client_order_ref"):

self.assertEqual(so.customer_order_number, res["client_order_ref"])
self.assertEqual(so.customer_order_free_ref, "MrBlue")

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
self.assertEqual(so.customer_order_free_ref, "MrBlue")
self.assertEqual(so.customer_order_free_ref, customer_reference)

wiz = self.env["sale.order.import"].create(
{"order_file": base64.b64encode(xml_file), "order_filename": filename}
)
f.close()

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
f.close()
root = etree.fromstring(xml_file)
cbc_namespace = root.nsmap.get('cbc')
customer_reference = root.find(f'{{{cbc_namespace}}}CustomerReference').text

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants