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

[18.0][MIG] product_harmonized_system: Migration to 18.0 #288

Open
wants to merge 32 commits into
base: 18.0
Choose a base branch
from

Conversation

LucasTran380381
Copy link

No description provided.

BenjaHe and others added 30 commits November 4, 2024 12:10
* Large code re-engineering following the Akretion-Noviat code sprint on intrastat

This code has been written both by Luc de Meyer and myself.

* hs_code display_name fix

* major update intrastat V3 modules

* Add product_origin_country_id on declaration/computation lines

Copy incoterms and destination country from SO to invoice when invoicing from SO
We need weight even when supplementary units is used
Small cleanups and enhancements

* Add support for accessory costs

Add default values for intrastat transaction on company
Code cleanup

* this week's ci errors

* Update README.rst

Rename variables

* Port intrastat_base to v10

Set 2 other modules to uninstallable
Update README.rst: switch to new intrastat project

* Port product_harmonized_system to v10

* Fix warning on display_name

Special thanks to Pedro and Holger for finding the solution for display_name
Fix demo data

* [MIG] product_harmonized_system: Migration to 11.0

* [FIX] product_harmonized_system: fix get_hs_code_recurively

* [IMP] *: removed utf-8 headers, changed icon and site

* company model test, country model test as in v8
* png logo instead of svg, removed Python 2 utf-8 headers

* [UPD] Update product_harmonized_system.pot

* Add new module product_harmonized_system_delivery (hide native hs_code field)

Finalize port to v11

* [FIX+IMP] intrastat_*: Several things:

* Add readonly on some fields when state of declaration is done
* Division by zero in computation of accessory costs
* Add FR translation
* Fix strings
* Minor code updates

* [MIG] intrastat_product: Migration to 11.0

* Small fixes in intrastat_base
* account_tax_template

* [ADD] icon.png

* [UPD] Update product_harmonized_system.pot

* Prepare v12 branch

* [MIG] Migrate all modules from v11 to v12

* flake8

* [UPD] Update product_harmonized_system.pot

* Update translation files

Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: intrastat-extrastat-12.0/intrastat-extrastat-12.0-product_harmonized_system
Translate-URL: https://translation.odoo-community.org/projects/intrastat-extrastat-12-0/intrastat-extrastat-12-0-product_harmonized_system/

* [FIX] product_harmized_system DESCRIPTION.rst

* [UPD] README.rst

* [UPD] README.rst

* Added translation using Weblate (Spanish)

* Translated using Weblate (Spanish)

Currently translated at 50.0% (18 of 36 strings)

Translation: intrastat-extrastat-12.0/intrastat-extrastat-12.0-product_harmonized_system
Translate-URL: https://translation.odoo-community.org/projects/intrastat-extrastat-12-0/intrastat-extrastat-12-0-product_harmonized_system/es/

* [MIG] product_harmonized_system : Migration to 13.0

* [IMP] product_harmonized_system: black, isort

[UPD] README.rst

[UPD] Update product_harmonized_system.pot

Update translation files

Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: intrastat-extrastat-13.0/intrastat-extrastat-13.0-product_harmonized_system
Translate-URL: https://translation.odoo-community.org/projects/intrastat-extrastat-13-0/intrastat-extrastat-13-0-product_harmonized_system/
product_harmonized_system 13.0.1.0.1

pre-commit update
intrastat_product: add mail.activity.mixin and widget in form view
product_harmonized_system: remove archive button (use Action menu)
All modules:
- use super() instead of super(class, self)
- Update domain_force in multi-company ir.rule to v13 standard
[UPD] README.rst

[UPD] Update product_harmonized_system.pot

Update translation files

Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: intrastat-extrastat-14.0/intrastat-extrastat-14.0-product_harmonized_system
Translate-URL: https://translation.odoo-community.org/projects/intrastat-extrastat-14-0/intrastat-extrastat-14-0-product_harmonized_system/
Currently translated at 80.5% (29 of 36 strings)

Translation: intrastat-extrastat-14.0/intrastat-extrastat-14.0-product_harmonized_system
Translate-URL: https://translation.odoo-community.org/projects/intrastat-extrastat-14-0/intrastat-extrastat-14-0-product_harmonized_system/es/
Currently translated at 100.0% (36 of 36 strings)

Translation: intrastat-extrastat-14.0/intrastat-extrastat-14.0-product_harmonized_system
Translate-URL: https://translation.odoo-community.org/projects/intrastat-extrastat-14-0/intrastat-extrastat-14-0-product_harmonized_system/fr/
Migration script provided for product.template and product.category
Fixes bug OCA#126
This commit is the "followup" of the change to company_dependent=False
on the fields hs_code_id on product.template and product.category.
Add groupby on hs_code_id on product.template search view
hs.code is now company_id=False by default

[UPD] Update product_harmonized_system.pot

product_harmonized_system 14.0.2.1.0

Update translation files

Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: intrastat-extrastat-14.0/intrastat-extrastat-14.0-product_harmonized_system
Translate-URL: https://translation.odoo-community.org/projects/intrastat-extrastat-14-0/intrastat-extrastat-14-0-product_harmonized_system/
[UPD] Update product_harmonized_system.pot

product_harmonized_system 14.0.2.2.0

Update translation files

Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: intrastat-extrastat-14.0/intrastat-extrastat-14.0-product_harmonized_system
Translate-URL: https://translation.odoo-community.org/projects/intrastat-extrastat-14-0/intrastat-extrastat-14-0-product_harmonized_system/
product_harmonized_system 14.0.2.3.0
Currently translated at 10.5% (4 of 38 strings)

Translation: intrastat-extrastat-14.0/intrastat-extrastat-14.0-product_harmonized_system
Translate-URL: https://translation.odoo-community.org/projects/intrastat-extrastat-14-0/intrastat-extrastat-14-0-product_harmonized_system/hr/
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: intrastat-extrastat-16.0/intrastat-extrastat-16.0-product_harmonized_system
Translate-URL: https://translation.odoo-community.org/projects/intrastat-extrastat-16-0/intrastat-extrastat-16-0-product_harmonized_system/
Currently translated at 100.0% (35 of 35 strings)

Translation: intrastat-extrastat-16.0/intrastat-extrastat-16.0-product_harmonized_system
Translate-URL: https://translation.odoo-community.org/projects/intrastat-extrastat-16-0/intrastat-extrastat-16-0-product_harmonized_system/hr/
Currently translated at 100.0% (35 of 35 strings)

Translation: intrastat-extrastat-16.0/intrastat-extrastat-16.0-product_harmonized_system
Translate-URL: https://translation.odoo-community.org/projects/intrastat-extrastat-16-0/intrastat-extrastat-16-0-product_harmonized_system/es/
Currently translated at 100.0% (35 of 35 strings)

Translation: intrastat-extrastat-16.0/intrastat-extrastat-16.0-product_harmonized_system
Translate-URL: https://translation.odoo-community.org/projects/intrastat-extrastat-16-0/intrastat-extrastat-16-0-product_harmonized_system/fr/
Currently translated at 100.0% (35 of 35 strings)

Translation: intrastat-extrastat-16.0/intrastat-extrastat-16.0-product_harmonized_system
Translate-URL: https://translation.odoo-community.org/projects/intrastat-extrastat-16-0/intrastat-extrastat-16-0-product_harmonized_system/fr/
Currently translated at 100.0% (35 of 35 strings)

Translation: intrastat-extrastat-16.0/intrastat-extrastat-16.0-product_harmonized_system
Translate-URL: https://translation.odoo-community.org/projects/intrastat-extrastat-16-0/intrastat-extrastat-16-0-product_harmonized_system/it/
Currently translated at 100.0% (35 of 35 strings)

Translation: intrastat-extrastat-16.0/intrastat-extrastat-16.0-product_harmonized_system
Translate-URL: https://translation.odoo-community.org/projects/intrastat-extrastat-16-0/intrastat-extrastat-16-0-product_harmonized_system/it/
@LucasTran380381 LucasTran380381 changed the title [MIG] product_harmonized_system: Migration to 18.0 [18.0][MIG] product_harmonized_system: Migration to 18.0 Nov 11, 2024
@LucasTran380381 LucasTran380381 force-pushed the 18.0-mig-product_harmonized_system branch from 82ef8bf to c66e6ae Compare November 12, 2024 09:40

def get_hs_code_recursively(self):
res = self.env["hs.code"]
if self:
Copy link
Member

Choose a reason for hiding this comment

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

Could we really have self not set ?
Maybe it is a good time to add some quick unit tests for this module although there is not much code in it.

Copy link
Author

@LucasTran380381 LucasTran380381 Nov 14, 2024

Choose a reason for hiding this comment

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

intrastat_product/models/account_move.py#L155
for example:
account.move.line: product_id is not required. so, rec.product_id (self) could be null

@OCA-git-bot
Copy link
Contributor

This PR has the approved label and has been created more than 5 days ago. It should therefore be ready to merge by a maintainer (or a PSC member if the concerned addon has no declared maintainer). 🤖

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

Successfully merging this pull request may close these issues.