server-ux icon indicating copy to clipboard operation
server-ux copied to clipboard

[18.0][IMP] base_tier_validation: Allow attachment generation after validation

Open bosd opened this issue 6 months ago • 2 comments

On a lot of models, it is a regular flow to have a pdf file generated after the validation flow has finished. e.g. on sale orders or invoices.

As discovered / discussed in: https://github.com/OCA/account-invoicing/issues/1998#issuecomment-2862437855

bosd avatar May 08 '25 20:05 bosd

Hi @LoisRForgeFlow, some modules you are maintaining are being modified, check this out!

OCA-git-bot avatar May 08 '25 20:05 OCA-git-bot

@victoralmau Maybe you have some good inputs for this one. In this PR you said that it was not needed version 17 and 18 (https://github.com/OCA/server-ux/pull/1069#issuecomment-2857505161).

LoisRForgeFlow avatar May 09 '25 11:05 LoisRForgeFlow

I have rechecked the behavior of this (e.g. through the [purchase_request_tier_validation](https://github.com/OCA/purchase-workflow/tree/18.0/purchase_request_tier_validation) module) and user (Marc Demo) if you can:

  • Add attachments manually.
  • Create notes with attachments.
  • Send an email with attachments.

ejemplo-2

Can someone else check it to confirm that this change is not necessary (also not in v17)?

victoralmau avatar May 09 '25 11:05 victoralmau

I encountered the error on sale orders and invoices on V18. Wierd, that purchase orders seems to be working.

bosd avatar May 09 '25 14:05 bosd

One can check the full flow in this pr: https://github.com/OCA/account-invoicing/pull/2002 First added the test to show it is failling without the fixes. 2nd commit adding the Fix for the account_move model 3 commit.. adding the modified base module with message_main_attachment_id in exclusion list. Tests are passing now :confetti_ball:

In this PR you said that it was not needed version 17 and 18

Additional Context: I can confirm that in earlier versions of odoo 18, the account_move_tier_validation was working and the extension of these exclusions was not needed. Somewhere among the last couple of months the module stopped working. (e.g. unable to send invoice to customer after validation).

Maybe there is a code change in odoo core?

bosd avatar May 09 '25 14:05 bosd

Can you also add it to 17?

Sure, althoug did not check if it is now required on v17 as well.

bosd avatar May 09 '25 15:05 bosd

On my way to merge this fine PR! Prepared branch 18.0-ocabot-merge-pr-1076-by-LoisRForgeFlow-bump-patch, awaiting test results.

OCA-git-bot avatar May 12 '25 07:05 OCA-git-bot

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

OCA-git-bot avatar May 12 '25 07:05 OCA-git-bot

@LoisRForgeFlow Thanks for the merge!

Just tested the account_move_tier_validation on the V17 branch. There this fix is not needed.

...(yet)

bosd avatar May 12 '25 08:05 bosd