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

Migration to version 18.0 #285

Open
4 of 7 tasks
OCA-git-bot opened this issue Oct 6, 2024 · 5 comments
Open
4 of 7 tasks

Migration to version 18.0 #285

OCA-git-bot opened this issue Oct 6, 2024 · 5 comments
Labels
help wanted no stale Use this label to prevent the automated stale action from closing this PR/Issue. work in progress
Milestone

Comments

@OCA-git-bot
Copy link
Contributor

OCA-git-bot commented Oct 6, 2024

Todo

https://github.com/OCA/maintainer-tools/wiki/Migration-to-version-18.0

Modules to migrate

Missing module? Check https://github.com/OCA/maintainer-tools/wiki/%5BFAQ%5D-Missing-modules-in-migration-issue-list

@OCA-git-bot OCA-git-bot added help wanted no stale Use this label to prevent the automated stale action from closing this PR/Issue. work in progress labels Oct 6, 2024
@OCA-git-bot OCA-git-bot added this to the 18.0 milestone Oct 6, 2024
@LucasTran380381
Copy link

LucasTran380381 commented Nov 4, 2024

Migration product_harmonized_system #288
Migration product_harmonized_system_delivery #290
Migration product_harmonized_system_stock #289

@StefanRijnhart StefanRijnhart pinned this issue Nov 25, 2024
@alexis-via
Copy link
Contributor

How do we handle the new product type "combo" ?
https://github.com/odoo/odoo/blob/18.0/addons/product/models/product_template.py#L64
How are we supposed to know if it's a product or a service ?
I must say I didn't investigate the real usage a this new type...

@pedrobaeza
Copy link
Member

I think that as soon as a product is included in the combo, it should be included in the Intrastat declaration.

@alexis-via
Copy link
Contributor

I studied more in depth the combo type of odoo v18.
First, when you add a product with type = "combo" in sale.order.line, it is replaced by the item lines of the combo. So, in the end, you don't have any product with type="combo" in your sale.order.line/invoice lines.
But, if you create an invoice manually, you can add a product with type="combo" in your invoice lines.
So, it is not common to have a product with type="combo" in the invoice lines, but it's possible.

I propose the following for intrastat:
in intrastat_base, we add a selection computed field "intrastat_type" that has 2 possible values : "product" or "service". The computation method will implement the following:

  • if type = "consu" => intrastat_type = "product"
  • if type = "service" => intrastat_type = "service"
  • if type = "combo" -> loop on product.combo and related product.combo.lines -> if one of the product has type = "consu" then intrastat_type = "product" ; otherwise "service". It means that, to consider a combo product as a service, ALL the combo items of its product.combos must be "service" products.
    If someone wants another behavior, he will be able to inherit the compute method of "intrastat_type". Or we can set the field intrastat_type as readonly=False and display it in the product form view to allow users to configure it manually on products.

@alexis-via
Copy link
Contributor

My proposal above on intrastat_type is now fully implemented in intrastat_base, intrastat_product and l10n_fr_intrastat_product.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted no stale Use this label to prevent the automated stale action from closing this PR/Issue. work in progress
Projects
None yet
Development

No branches or pull requests

4 participants