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] DES and EMEBI : update, improve and simplify #383

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

Conversation

alexis-via
Copy link
Contributor

l10n_fr_intrastat_product (EMEBI):

  • 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 (DES):

  • 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

Depends on PR OCA/intrastat-extrastat#198

@alexis-via
Copy link
Contributor Author

One important note: don't try to upgrade from previous version with existing data, it won't work ! Writing migration scripts will be a big task... but I guess we'll have to do it one day.

@legalsylvain
Copy link
Contributor

hi @alexis-via. thanks for this huge contribution.

One important note: don't try to upgrade from previous version with existing data, it won't work ! Writing migration scripts will be a big task... but I guess we'll have to do it one day.

Not sure to understand. Did you plan to merge this PR before providing migration scripts ? Or this PR will stay opened ?

@alexis-via
Copy link
Contributor Author

@legalsylvain As explained on the underlying PR on OCA/intrastat-extrastat, I don't think the underlying PR will be merged. Maybe I will have some remarks that will lead to more changes in the datamodel, so I'd better wait for some first feedback before working on the migration script to avoid double work. Anyway, I'll have to write migration script to migrate my own customers, so I'll have to write them one day, and it will be a big work (and I'm not an expert in this field, so it takes me quite some time for me).

But I wanted to publish this PR now, to get some feedback on the changes I propose and also to allow new installations to have a working version for DEB/EMEBI (the previous version was broken following a big Brexit PR that was over-complex OCA/intrastat-extrastat#163)

@legalsylvain
Copy link
Contributor

Thanks a lot for your explanation. perfectly clear.

@alexis-via alexis-via changed the title DES and EMEBI : update, improve and simplify [14.0] DES and EMEBI : update, improve and simplify Dec 3, 2022
@alexis-via alexis-via mentioned this pull request Jan 30, 2023
elif move_type in ("out_invoice", "out_refund"):
so_line = self.env["sale.order.line"].search(
[("invoice_lines", "in", inv_line.id)], limit=1
)
if so_line:
so = so_line.order_id
dpt = so.warehouse_id.get_fr_department()
dpt = so.warehouse_id._get_fr_department()
Copy link
Contributor

Choose a reason for hiding this comment

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

le champ warehouse_id est présent sur les so_lines
dpt = so_line.warehouse_id._get_fr_department()

j'ai un client qui fait du multi entrepot par commande.

@legalsylvain legalsylvain added this to the 14.0 milestone Jun 9, 2023
@github-actions
Copy link

github-actions bot commented Oct 8, 2023

There hasn't been any activity on this pull request in the past 4 months, so it has been marked as stale and it will be closed automatically if no further activity occurs in the next 30 days.
If you want this PR to never become stale, please ask a PSC member to apply the "no stale" label.

@github-actions github-actions bot added the stale PR/Issue without recent activity, it'll be soon closed automatically. label Oct 8, 2023
@github-actions github-actions bot closed this Nov 12, 2023
@alexis-via alexis-via added no stale Use this label to prevent the automated stale action from closing this PR/Issue. and removed stale PR/Issue without recent activity, it'll be soon closed automatically. labels Dec 22, 2023
@alexis-via alexis-via reopened this Jan 31, 2024
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
_generate_xml() : Don't raise if company_id.fr_intrastat_accreditation
is not set, to avoid blocking draft->done
Update data for account.fiscal.position.template
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
no stale Use this label to prevent the automated stale action from closing this PR/Issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants