Commit Graph
5 Commits
Author SHA1 Message Date
aliya 2d051168a4 [FIX] account_peppol: fix migration key, sql constraints
Currently, the migration key is stored through a workaround as a config parameter,
because the behaviour needed to be changed in stable.
Now, several things can be fixed:
- `account_peppol_migration_key` is now a field on `res.company`, not `account_edi_proxy_client.user`
- `account_peppol_attachment_ids` can be removed as the specs changed and it's no longer necessary
- `peppol_proxy_state` can be removed as it's no longer useful after `enable_peppol` was added
- SQL constraints need to be changed to only include active users.
  This allows users to deregister/migrate away from Peppol and then re-register later, with their previous edi user being archived

closes odoo/odoo#129595

Related: odoo/upgrade#4980
Signed-off-by: Laurent Smet (las) <las@odoo.com>
2023-08-03 08:26:28 +02:00
aliya 35d8048044 [FIX] account_peppol: fix saving of the migration key
`account_peppol_migration_key` is a related field, stored on the `account_edi_proxy_client.user`.
We want to allow users to provide a migration key when they want to register as a new peppol participant,
migrating their existing peppol registration from another smp.
However, before they save and validate their registration,
there is no `account_edi_proxy_client.user` associated with the company and
hence the `migration_key` is never saved and never sent to the IAP server.
The solution in master will be to move this field to `res.company`
but in stable the workaround is to store it in `ir.config_parameter` and make it a computed field,
where the config parameter is updated in the inverse method on `account_peppol_migration_key`.

closes odoo/odoo#129691

X-original-commit: d5edca101e6a1dd751a3c95d713831e99fc18462
Signed-off-by: Laurent Smet (las) <las@odoo.com>
Signed-off-by: Aliya Tastemirova (alta) <alta@odoo.com>
2023-07-26 10:48:54 +02:00
aliya d3fda38f00 [IMP] account_peppol: improve participant onboarding
This commit adds several improvements in Peppol onboarding process:
- Adds a phone number verification process
- Adds a possibility to migrate away/cancel the registration
- Adds a possibility to update contact details for the participant
- UX improvements like autosave
- Set 0208 as the default EAS code for Belgium
- Add a check for certain peppol endpoint numbers (based on Peppol schematron rules)

task-3060814

closes odoo/odoo#127092

Signed-off-by: Florian Gilbert (flg) <flg@odoo.com>
2023-07-13 19:28:04 +02:00
aliya f4d7d75835 [FIX] account_peppol: fix account_peppol checkbox
Currently:
Create an invoice and send it using Peppol and make sure the PDF and the XML are well generated but Peppol failed for some reason.
When opening the wizard later, the checkbox is no longer there since the XML is already generated.

Fix:
This commit adds enable_peppol to show the checkbox depending on this field, so that if there is already a ubl XML generated, we can still send an invoice via Peppol.
Also, if the ubl generation is enabled but ubl checkbox is not checked, and the user chooses to send via peppol,
we assume that the ubl xml needs to be generated as well.

task-3358419

closes odoo/odoo#124496

Signed-off-by: Laurent Smet <las@odoo.com>
2023-06-15 17:36:30 +02:00
aliya 64a0f84640 [IMP] account_peppol: add tests
account_peppol module currently doesn't have any tests.
This commit adds tests to test the participant,
sending and receiving peppol messages, peppol functionality in the
send and print wizard.

task-3321786

closes odoo/odoo#124436

Signed-off-by: John Laterre (jol) <jol@odoo.com>
Signed-off-by: Laurent Smet <las@odoo.com>
2023-06-09 17:01:18 +02:00