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

[16.0][MIG] EMEBI (ex-DEB) l10n_fr_intrastat_product #413

Merged
merged 184 commits into from
Jun 9, 2023

Conversation

alexis-via
Copy link
Contributor

Requires OCA/intrastat-extrastat#214

This migration started from the v14 PR #383

It includes the changes discussed in OCA/intrastat-extrastat#194 in particular the fact that intrastat transaction are now provided by the generic module intrastat_product.
Code regime is now provided by a new dedicated object intrastat.fr.regime.
This change involve one big change:
BEFORE: code regime = transaction_id.code ; nature de transaction = transaction_id.fr_transaction_code
AFTER: code regime = fr_regime_id.code ; nature de transaction = transaction_id.code

Adapt to changes in intrastat_base with the 'intrastat' field of fiscal position converted from boolean to selection with 3 possible values b2b/b2c/no.

Alexis de Lattre added 30 commits January 24, 2023 23:38
…rst factorisation of common functionnal code between the product and service module (intrastat_common.py) - to be continued. Some code clean-up in the service module.
…nsport type" and partial support for the department. More factorisation between product & service module. Add date_done field. More checks.
… (fields that are not in the official declaration or never subject to change) Add copy of department from warehouse to invoice. Import DEB don't have the partner_vat field Department can be 99 for Monaco. Copy tranport and department from report_intrastat_product in XML file First attempt at adapting the display of fields depending on the type of declaration.
…string to many2one.

WARNING : this is my last commit before I break everything to re-organise the way intrastat_types are handled and I drop the "Intrastat type" field on invoices.
…tat_product/service object is stored in database, we don't need the legal_intrastat state on invoices any more, because we will be able to create entry lines for DEB for a repair of equipment under warranty without using a legal_intrastat. Report_intrastat_type is now only required for DEB -> object moved to module l10n_fr_intrastat_product. For DEB, the button "regenerate lines" only regenerate DEB lines related to invoices.

Renamed intrastat base module, because it doesn't have France-specific parameters any more.

Add demo data.
…rocedure_code, for example some info don't need to be declared for some procedure codes. Ability to enter DEB lines manually Stat value doesn't exist any more Tree vue of DEB lines is now identical to Cerfa
…view. Beta implementation of "Re-generate lines from picking". [FIX] Check on weight_net instead of weight.
…torize lines taken from picking renamed field invoice_uom_id to source_uom_id, because this field is now also used for lines taken from picking Removed field date_invoice Removed the label "beta" on the button "generate lines from picking".
… in the function compute_lines_from_picking - add a field.function "intrastat department" on picking - updated the code accordingly : we can now have the department of the picking when generating lines from picking.
…/purchase orders that have a shipping policy != 'invoice from the packing' So it should now only select incoming/outgoing products used for RMAs
…port_intrastat_type table, restarting OpenERP and re-creating intrastat types. Moved intrastat departments from stock.warehouse to stock.location. Dropped SQL queries ; replaced by traditionnal python code logic. No more need to have one rate per day for invoices with foreign currency. Add total fiscal value for DEB More code factorization. Prepare translation work.
…pecific tax in it. For example, this is required for B2C companies, that mustn't put in DEB Export the invoices to EU customers that contain French VAT.
…ith the type of field of transaction_code on intrastat_type Add field "Destination/Origin country of the goods" on invoice Write the value of this field when creating the invoice from the packing Fix a bug in the computation of the department on picking, and now make it a stored field. Now able to copy origin/dest country and department on invoice when the invoice is created from SO/PO (before, it was only supported when creating the invoice from the packing).
… Moved configuration about taxes from company form to tax form Some modifications to ease v5 -> v6 migration : - object report_intrastat_code now belong to group account manager - button functions now return True Tried to implement the following feature : open attachement form when the XML file as been generated : works on v6, but make client crash en v5 -> code has been commented DEB lines with procedure code = 25 are now deducted from the fiscal total. Round invoice total.
… l10n_fr_intrastat_product to intrastat_base, because it should also be used in the module l10n_fr_intrastat_service. Take this field into account in the generation of DEB lines (module l10n_fr_intrastat_service).
…t lines. Auto-fill the intrastat UoM field when creating an intrastat product line manually.
OCA-git-bot and others added 17 commits January 24, 2023 23:38
2 variables were using the same name: the node and the content of the node
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: l10n-france-14.0/l10n-france-14.0-l10n_fr_intrastat_product
Translate-URL: https://translation.odoo-community.org/projects/l10n-france-14-0/l10n-france-14-0-l10n_fr_intrastat_product/
Currently translated at 6.0% (11 of 182 strings)

Translation: l10n-france-14.0/l10n-france-14.0-l10n_fr_intrastat_product
Translate-URL: https://translation.odoo-community.org/projects/l10n-france-14-0/l10n-france-14-0-l10n_fr_intrastat_product/it/
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: l10n-france-14.0/l10n-france-14.0-l10n_fr_intrastat_product
Translate-URL: https://translation.odoo-community.org/projects/l10n-france-14-0/l10n-france-14-0-l10n_fr_intrastat_product/
l10n_fr_intrastat_product:
- adapt to the very big changes I made in intrastat_product
- DEB -> EMEBI
- remove intrastat_fiscal_representative_id on res.partner
- add a default intrastat transaction for B2C
- filter intrastat_transaction_id on invoice form depending on move_type

l10n_fr_intrastat_service:
- auto-generate XML export upon confirmation to harmonize ergonomy with intrastat product
- auto-delete XML upon back2draft
- add confirmation pop-up when going back to draft
- fix bug on total amount and number of lines when removing all lines
- adapt for the fact that EU B2C fiscal positions now have intrastat=True
Set company_id to False on intrastat.transaction
This migration started from the v14 branch akretion/14-emebi-simplify
It includes the changes discussed in
OCA/intrastat-extrastat#194 in particular the
fact that intrastat transaction are now provided by the generic module
intrastat_product.
This change involve one big change:
BEFORE: code regime = transaction_id.code ; nature de transaction =
transaction_id.fr_transaction_code
AFTER: code regime = fr_regime_id.code ; nature de transaction =
transaction_id.code

Adapt to changes in intrastat_base with the 'intrastat' field of fiscal
position converted from boolean to selection with 3 possible values
b2b/b2c/no
@alexis-via alexis-via changed the title [16.0][MIG] EMEBI (ex-DEB) [16.0][MIG] EMEBI (ex-DEB) l10n_fr_intrastat_product May 2, 2023
@alexis-via
Copy link
Contributor Author

/ocabot merge nobump

@OCA-git-bot
Copy link
Contributor

Hey, thanks for contributing! Proceeding to merge this for you.
Prepared branch 16.0-ocabot-merge-pr-413-by-alexis-via-bump-nobump, awaiting test results.

@OCA-git-bot OCA-git-bot merged commit 35edd8e into OCA:16.0 Jun 9, 2023
@OCA-git-bot
Copy link
Contributor

Congratulations, your PR was merged at 527bacd. Thanks a lot for contributing to OCA. ❤️

@legalsylvain
Copy link
Contributor

/ocabot migration l10n_fr_intrastat_product

@OCA-git-bot OCA-git-bot added this to the 16.0 milestone Jun 9, 2023
@OCA-git-bot OCA-git-bot mentioned this pull request Jun 9, 2023
29 tasks
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.