Skip to content

[19.0][MIG] purchase_order_import_ubl: Migration to 19.0#1336

Open
yankinmax wants to merge 15 commits intoOCA:19.0from
camptocamp:19.0-mig-purchase_order_import_ubl
Open

[19.0][MIG] purchase_order_import_ubl: Migration to 19.0#1336
yankinmax wants to merge 15 commits intoOCA:19.0from
camptocamp:19.0-mig-purchase_order_import_ubl

Conversation

@yankinmax
Copy link
Copy Markdown

alexis-via and others added 13 commits April 28, 2026 09:25
Add support for partner bank matching on invoice update (before, it was only supported on invoice creation)
Rename __openerp__.py to __manifest__.py and set installable to False
Add ubl invoice generation option in accounting config page
…iness document is imported in the right company
The ORderResponce document allows a supplier to communicate the ack and the confirmation of an Order documnet. Depending of its content, the PO will be cancelled or confirmed. If the OrderResponse document contains some amended line, the import process will update the picking to reflect the changes
@OCA-git-bot OCA-git-bot added series:19.0 mod:purchase_order_import_ubl Module purchase_order_import_ubl labels Apr 28, 2026
@yankinmax
Copy link
Copy Markdown
Author

Hello @vvrossem @ivantodorovich
Can you pls take a look?

@yankinmax yankinmax force-pushed the 19.0-mig-purchase_order_import_ubl branch from f38e464 to f575858 Compare April 28, 2026 12:43
Copy link
Copy Markdown
Contributor

@ivantodorovich ivantodorovich left a comment

Choose a reason for hiding this comment

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

Thanks Maksym!

Comment on lines +51 to +61
Domain.AND(
[
Domain("company_id", "in", [cls.env.company.id, False]),
Domain.OR(
[
Domain("barcode", "=", product_code),
Domain("default_code", "=", product_code),
]
),
]
),
Copy link
Copy Markdown
Contributor

@ivantodorovich ivantodorovich Apr 28, 2026

Choose a reason for hiding this comment

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

(
    Domain("company_id", "in", [cls.env.company.id, False])
    & (
        Domain("barcode", "=", product_code)
        | Domain("default_code", "=", product_code)
    )
)

💡 tip (only suggestion, not change request): one very good thing with the new Domain implementation is that you can use pythonic operators to chain/describe the expression

maybe it's matter of taste, though. Don't change for me, just wanted to share

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

This is also nice for chaining and it can be easier to read for a big domains. Agree with your change.

def test_ubl_order_import_from_embedded_pdf(self):
"""Update an RFQ from a PDF with an embedded UBL quotation."""
filename = "quote-PO00004.pdf"
with file_open(f"purchase_order_import_ubl/tests/files/{filename}", "rb") as f:
Copy link
Copy Markdown
Contributor

@ivantodorovich ivantodorovich Apr 28, 2026

Choose a reason for hiding this comment

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

💡 tip: pathlib

quote_file = Path(f"purchase_order_import_ubl/tests/files/{filename}").read_bytes()

no need to change

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

I'll change I like it

@yankinmax yankinmax force-pushed the 19.0-mig-purchase_order_import_ubl branch from f575858 to ceb0be7 Compare April 28, 2026 14:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

mod:purchase_order_import_ubl Module purchase_order_import_ubl series:19.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants