OCA/sale-workflow

[16.0][BUG] sale_elaboration with delivery incompatibility

Closed this issue · 7 comments

Hello:

I've recorded a 1 minute vídeo with the STR

https://www.loom.com/share/3d01653df2b6427db515d47d6b26cd93?sid=7af3291e-0eb3-4c39-a2ce-c6087449c5b5

Modules

Describe the bug

The elaborations note are deleted after saving the sale order

To Reproduce

STR:

  • Add a product 1 with elaboration 1

  • Add a product 2 with elaboration 2

  • Add delivery cost with Odoo button and save.

  • Add a product 3 with elaboration 1,2,3 o whatever

  • Save

  • Elaboration notes from lines 1 and 2 are deleted (recalculated)

Expected behaviour

  • Elaboration notes from lines 1 and 2 maintain with the text written before

Thank you!

MT-6164 @moduon #3153 cc @Shide @yajo

Ping @sergio-teruel @carlosdauden @pedrobaeza @CarlosRoca13 , our FIX can affect you because our idea it tom make "elaboration note" not computed so we have to change later reports to print a concatenation of elaboration + elaboration_note in a "display name"

Love to everyone 💘 😄

Regards,
Rafael

Sorry, I do not see the fixing PR

yajo commented

We're asking if the proposed fix is correct for you, as it means a behavioral change:

our idea is to make "elaboration note" not computed, so we have to change, later, reports to print a concatenation of elaboration + elaboration_note

there is other modules like product_supplierinfo_for_customer_elaboration that uses the computed methods...
Let me analyse the issue to find another way to solve it.

Hello @sergio-teruel ,

Other modules are affected as:

  • sale_order_product_recommendation_elaboration
  • stock_picking_fresh_logistic_label

Also which you said:

  • product_supplierinfo_for_customer_elaboration

If find a better way perfect if not, we can FIX/IMP all the modules affected in 16.0 so in the migration to 17.0 the issue will be corrected.

Thank you! 👍🏼

It seems to be a Odoo core issue the computation of all lines... Is it the same in v17??
However, I believe that the computation of the elaboration note can be inhibited using a system parameter... to make it compatible with delivery module..

We have some custom reports that use this field...

yajo commented

Is it the same in v17??

We don't know because the module isn't available in that version.

However, I believe that the computation of the elaboration note can be inhibited using a system parameter... to make it compatible with delivery module..

We considered that option but it doesn't make much sense to me.

In most cases, users should be able to expect that modules work out of the box with at least any odoo core addons installed.

My guess is that delivery must be doing something weird, but it's upstream Odoo and it's gonna be impossible to convince them to change their module just because we have incompatibilities downstream.

We have some custom reports that use this field...

IIUC your reports only exist on v15, so it shouldn't break anything for you. And the adaptation needed after the migration will be very small.

At the end of the day, the module design is a bit weird. Users input elaborations in a m2o field and those get copied in a text field, so that then they can be edited and printed in the report. It seems to me like it's quite cumbersome and could be much simplified by:

  • Reports include values from m2o field directly.
  • Notes are not autocomputed. Only added if needed.
  • Reports include notes too, if they have a value.

So, code will be simplified and the possible low level problems that come from the delivery computations should disappear.

Am I missing something?

yajo commented

Fix in #3165, please review.