Tryton - Issues

 

Issue7605

Title mandatory analytic and sale_shipment_cost
Priority bug Status resolved
Superseder Nosy List ced, jcm, reviewbot, roundup-bot
Type behavior Components analytic_account, analytic_sale, sale_shipment_cost
Assigned To ced Keywords review
Reviews 70531002
View: 70531002

Created on 2018-08-03.09:25:35 by jcm, last changed by roundup-bot.

Messages
New changeset 2e0eef4f87cf by Cédric Krier in branch 'default':
Remove mandatory on analytic roots
https://hg.tryton.org/tryton-env/rev/2e0eef4f87cf
New changeset be01a2ddcb79 by Cédric Krier in branch 'default':
Remove mandatory on analytic roots
https://hg.tryton.org/modules/analytic_sale/rev/be01a2ddcb79
New changeset f160c38addd9 by Cédric Krier in branch 'default':
Remove mandatory on analytic roots
https://hg.tryton.org/modules/analytic_purchase/rev/f160c38addd9
New changeset 9c877cee41e9 by Cédric Krier in branch 'default':
Remove mandatory on analytic roots
https://hg.tryton.org/modules/analytic_invoice/rev/9c877cee41e9
New changeset 69d28a7108fe by Cédric Krier in branch 'default':
Remove mandatory on analytic roots
https://hg.tryton.org/modules/analytic_account/rev/69d28a7108fe
review70531002 updated at https://codereview.tryton.org/70531002/#ps20001
review70531002 updated at https://codereview.tryton.org/70531002/#ps1
msg46818 (view) Author: [hidden] (ced) (Tryton committer) (Tryton translator) Date: 2019-02-06.23:29:41
And the same applies to warnings of course.
msg46817 (view) Author: [hidden] (ced) (Tryton committer) (Tryton translator) Date: 2019-02-06.23:28:31
Here is review70531002 which remove the mandatory flag.
I opted for this solution because it is always a difficulty to have constraint that comes from the user configuration. It prevents automation and can break a complete workflow just because one user decided to turn on the switch.
msg43068 (view) Author: [hidden] (ced) (Tryton committer) (Tryton translator) Date: 2018-08-26.12:32:39
Since issue5900, I think we should remove the mandatory flag on analytic axis. Or at least it should not be a strict constraint (maybe a warning).
msg42624 (view) Author: [hidden] (jcm) Date: 2018-08-03.09:25:35
With a mandatory analytic root, I cannot use sale_shipment_cost to add calculated shipment price with carrier_weight on sale.

I tested on demo4.8 to reproduce it.
Activate analytic_account, analytic_invoice, analytic_sale, carrier, carrier_weight, sale_shipment_cost.
Create Carrier (product, party) and CarrierSelection.
Configure Sale with SaleShipmentCostMethod OnOrder.
Create a simple analytic with root (mandatory) and two children, product and carrier.
Make a new sale, add a line with a product, choose analytic ‘product’ on line.
Message is « The field "Account" on "Analytic Account Entry" is required. » when trying to change Draft Sale to Quote.

IMHO it’s the carrier sale line added automatically that has no analytic.
I tried to add an AnalyticRule to add it automatically from Account, but this doesn’t work. Probably there’s no write to the journal at the time the saleline is created.
History
Date User Action Args
2019-03-02 14:06:34cedlinkissue8163 superseder
2019-02-18 18:40:35roundup-botsetmessages: + msg47097
2019-02-18 18:40:27roundup-botsetmessages: + msg47096
2019-02-18 18:40:24roundup-botsetmessages: + msg47095
2019-02-18 18:40:19roundup-botsetmessages: + msg47094
2019-02-18 18:40:14roundup-botsetstatus: testing -> resolved
nosy: + roundup-bot
messages: + msg47093
2019-02-07 00:15:29reviewbotsetmessages: + msg46820
2019-02-06 23:34:50reviewbotsetnosy: + reviewbot
messages: + msg46819
2019-02-06 23:29:41cedsetmessages: + msg46818
2019-02-06 23:28:31cedsetstatus: in-progress -> testing
reviews: 70531002
messages: + msg46817
keyword: + review
2019-02-06 23:25:33cedsetstatus: chatting -> in-progress
assignedto: ced
2018-08-26 12:32:39cedsetstatus: unread -> chatting
nosy: + ced
messages: + msg43068
2018-08-04 00:56:23cedsetcomponent: - analytic_invoice, carrier, carrier_weight
2018-08-03 09:25:35jcmcreate