Created on 2021-02-07.14:37:23 by ced, last changed 16 months ago by roundup-bot.
New changeset c066c4c4a1b7 by Cédric Krier in branch 'default': Add test on context of company multivalue target fields https://hg.tryton.org/tryton-env/rev/c066c4c4a1b7
New changeset 29ad0bfff95b by Cédric Krier in branch 'default': Add test on context of company multivalue target fields https://hg.tryton.org/modules/web_shop/rev/29ad0bfff95b
New changeset 8354e0811e35 by Cédric Krier in branch 'default': Add test on context of company multivalue target fields https://hg.tryton.org/modules/timesheet_cost/rev/8354e0811e35
New changeset 812f08e44e42 by Cédric Krier in branch 'default': Add test on context of company multivalue target fields https://hg.tryton.org/modules/timesheet/rev/812f08e44e42
New changeset 7edee43f2c4f by Cédric Krier in branch 'default': Add test on context of company multivalue target fields https://hg.tryton.org/modules/stock_inventory_location/rev/7edee43f2c4f
New changeset ae24c4d5f852 by Cédric Krier in branch 'default': Add test on context of company multivalue target fields https://hg.tryton.org/modules/stock_forecast/rev/ae24c4d5f852
New changeset 1abb4c534c70 by Cédric Krier in branch 'default': Add test on context of company multivalue target fields https://hg.tryton.org/modules/stock/rev/1abb4c534c70
New changeset 29ca5bbe3215 by Cédric Krier in branch 'default': Add test on context of company multivalue target fields https://hg.tryton.org/modules/sale_supply_drop_shipment/rev/29ca5bbe3215
New changeset e673033fdd74 by Cédric Krier in branch 'default': Add test on context of company multivalue target fields https://hg.tryton.org/modules/sale_subscription/rev/e673033fdd74
New changeset c3476da72e5c by Cédric Krier in branch 'default': Add test on context of company multivalue target fields https://hg.tryton.org/modules/sale_promotion/rev/c3476da72e5c
New changeset 7af9b496a260 by Cédric Krier in branch 'default': Add test on context of company multivalue target fields https://hg.tryton.org/modules/sale_price_list/rev/7af9b496a260
New changeset 8c8baff4fe23 by Cédric Krier in branch 'default': Add test on context of company multivalue target fields https://hg.tryton.org/modules/sale_opportunity/rev/8c8baff4fe23
New changeset a9117f571bb8 by Cédric Krier in branch 'default': Add test on context of company multivalue target fields https://hg.tryton.org/modules/sale_extra/rev/a9117f571bb8
New changeset 0581cdd92fbd by Cédric Krier in branch 'default': Add test on context of company multivalue target fields https://hg.tryton.org/modules/sale_credit_limit/rev/0581cdd92fbd
New changeset 840def541d23 by Cédric Krier in branch 'default': Add test on context of company multivalue target fields https://hg.tryton.org/modules/sale_complaint/rev/840def541d23
New changeset 8ebb6505676c by Cédric Krier in branch 'default': Add test on context of company multivalue target fields https://hg.tryton.org/modules/sale/rev/8ebb6505676c
New changeset 89d7c88aad99 by Cédric Krier in branch 'default': Add test on context of company multivalue target fields https://hg.tryton.org/modules/purchase_requisition/rev/89d7c88aad99
New changeset 995f7ec8eb5d by Cédric Krier in branch 'default': Add test on context of company multivalue target fields https://hg.tryton.org/modules/purchase_request_quotation/rev/995f7ec8eb5d
New changeset ae93b9433870 by Cédric Krier in branch 'default': Add test on context of company multivalue target fields https://hg.tryton.org/modules/purchase_request/rev/ae93b9433870
New changeset 71b597b62408 by Cédric Krier in branch 'default': Add test on context of company multivalue target fields https://hg.tryton.org/modules/purchase_price_list/rev/71b597b62408
New changeset 1e72fa3df393 by Cédric Krier in branch 'default': Add test on context of company multivalue target fields https://hg.tryton.org/modules/purchase/rev/1e72fa3df393
New changeset ecb3b008b154 by Cédric Krier in branch 'default': Add test on context of company multivalue target fields https://hg.tryton.org/modules/project_revenue/rev/ecb3b008b154
New changeset cf445cd7954b by Cédric Krier in branch 'default': Add test on context of company multivalue target fields https://hg.tryton.org/modules/project_plan/rev/cf445cd7954b
New changeset f1f81a693bf3 by Cédric Krier in branch 'default': Add test on context of company multivalue target fields https://hg.tryton.org/modules/project/rev/f1f81a693bf3
New changeset 46cd95e3f4e1 by Cédric Krier in branch 'default': Add test on context of company multivalue target fields https://hg.tryton.org/modules/production_work/rev/46cd95e3f4e1
New changeset b448c92b5b34 by Cédric Krier in branch 'default': Add test on context of company multivalue target fields https://hg.tryton.org/modules/production/rev/b448c92b5b34
New changeset f25c9efa916a by Cédric Krier in branch 'default': Add test on context of company multivalue target fields https://hg.tryton.org/modules/product_price_list/rev/f25c9efa916a
New changeset 4559797d847c by Cédric Krier in branch 'default': Add test on context of company multivalue target fields https://hg.tryton.org/modules/product/rev/4559797d847c
New changeset 7593dbf03bcb by Cédric Krier in branch 'default': Add test on context of company multivalue target fields https://hg.tryton.org/modules/notification_email/rev/7593dbf03bcb
New changeset f49c9caf802e by Cédric Krier in branch 'default': Add test on context of company multivalue target fields https://hg.tryton.org/modules/company_work_time/rev/f49c9caf802e
New changeset 172461253744 by Cédric Krier in branch 'default': Add test on context of company multivalue target fields https://hg.tryton.org/modules/company/rev/172461253744
New changeset 720cf53c0c07 by Cédric Krier in branch 'default': Add test on context of company multivalue target fields https://hg.tryton.org/modules/carrier_weight/rev/720cf53c0c07
New changeset 1da4ea10bf4a by Cédric Krier in branch 'default': Add test on context of company multivalue target fields https://hg.tryton.org/modules/attendance/rev/1da4ea10bf4a
New changeset beb9d9a52376 by Cédric Krier in branch 'default': Add test on context of company multivalue target fields https://hg.tryton.org/modules/analytic_account/rev/beb9d9a52376
New changeset d97d7aad38d6 by Cédric Krier in branch 'default': Add test on context of company multivalue target fields https://hg.tryton.org/modules/account_statement_rule/rev/d97d7aad38d6
New changeset 7a7db6cfa87b by Cédric Krier in branch 'default': Add test on context of company multivalue target fields https://hg.tryton.org/modules/account_statement/rev/7a7db6cfa87b
New changeset 472cf1d757b9 by Cédric Krier in branch 'default': Add test on context of company multivalue target fields https://hg.tryton.org/modules/account_product/rev/472cf1d757b9
New changeset 0f7f1e7b54ea by Cédric Krier in branch 'default': Add test on context of company multivalue target fields https://hg.tryton.org/modules/account_payment_sepa_cfonb/rev/0f7f1e7b54ea
New changeset 4039f71221d1 by Cédric Krier in branch 'default': Add test on context of company multivalue target fields https://hg.tryton.org/modules/account_payment_sepa/rev/4039f71221d1
New changeset e16737bfa1cd by Cédric Krier in branch 'default': Add test on context of company multivalue target fields https://hg.tryton.org/modules/account_payment/rev/e16737bfa1cd
New changeset e1bda4d7ae1d by Cédric Krier in branch 'default': Add test on context of company multivalue target fields https://hg.tryton.org/modules/account_invoice/rev/e1bda4d7ae1d
New changeset c6194649bfbc by Cédric Krier in branch 'default': Add test on context of company multivalue target fields https://hg.tryton.org/modules/account_fr_chorus/rev/c6194649bfbc
New changeset fd2794c6e85f by Cédric Krier in branch 'default': Add test on context of company multivalue target fields https://hg.tryton.org/modules/account_eu/rev/fd2794c6e85f
New changeset 3c6c3291b227 by Cédric Krier in branch 'default': Add test on context of company multivalue target fields https://hg.tryton.org/modules/account_dunning_letter/rev/3c6c3291b227
New changeset ba4f0f95aaad by Cédric Krier in branch 'default': Add test on context of company multivalue target fields https://hg.tryton.org/modules/account_dunning/rev/ba4f0f95aaad
New changeset 583667a3e6bb by Cédric Krier in branch 'default': Add test on context of company multivalue target fields https://hg.tryton.org/modules/account_deposit/rev/583667a3e6bb
New changeset 6778963ae1f6 by Cédric Krier in branch 'default': Add test on context of company multivalue target fields https://hg.tryton.org/modules/account_credit_limit/rev/6778963ae1f6
New changeset 45ee2effc44c by Cédric Krier in branch 'default': Add test on context of company multivalue target fields https://hg.tryton.org/modules/account/rev/45ee2effc44c
In order to achieve issue4080 we need to be sure that referential record of type CompanyMultiValueMixin
has the proper company in the context so the MultiValue
fields returns the correct value.
Initially I thought that we should use get_multivalue
everywhere and ensure to set the proper context but this can not be done for the on_change calls.
But since issue8586 and issue8225 we can rely on instance having the proper context (if the developer does not set deliberately something else).
So the proposal is to add a MixinTestCase
in company to be used on module depending on company that checks for models having a Many2One
to company.company
that fields linking to CompanyMultiValueMixin
have a company
context set.
This will not directly ensure that on_change calls have the proper depends but if accessing a CompanyMultiValue
from a field having the context defined but the value is empty, will return no value as None
will not match and so the code will fail even if the global context has the proper company
key.
Also this will reduce the cases where using get_multivalue
is really needed.
An initial test shows that such test enforces cases that may not be problematic like the party on shipments but in some point it will anyway good to show related properties like accounting for the shipment's company.
History | |||
---|---|---|---|
Date | User | Action | Args |
2021-03-05 15:53:04 | roundup-bot | set | messages: + msg65175 |
2021-03-05 15:53:01 | roundup-bot | set | messages: + msg65174 |
2021-03-05 15:52:59 | roundup-bot | set | messages: + msg65173 |
2021-03-05 15:52:56 | roundup-bot | set | messages: + msg65172 |
2021-03-05 15:52:54 | roundup-bot | set | messages: + msg65171 |
2021-03-05 15:52:52 | roundup-bot | set | messages: + msg65170 |
2021-03-05 15:52:50 | roundup-bot | set | messages: + msg65169 |
2021-03-05 15:52:46 | roundup-bot | set | messages: + msg65168 |
2021-03-05 15:52:44 | roundup-bot | set | messages: + msg65167 |
2021-03-05 15:52:38 | roundup-bot | set | messages: + msg65166 |
Showing 10 items. Show all history (warning: this could be VERY long)