Created on 2018-03-08.11:18:30 by pokoli, last changed 31 months ago by roundup-bot.
New changeset e7c0b6446e17 by Sergi Almacellas Abellana in branch '5.4': Add company domain on asset analytic accounts https://hg.tryton.org/modules/analytic_invoice/rev/e7c0b6446e17 New changeset 95e207047ded by Sergi Almacellas Abellana in branch '5.2': Add company domain on asset analytic accounts https://hg.tryton.org/modules/analytic_invoice/rev/95e207047ded New changeset 56d673829a7e by Sergi Almacellas Abellana in branch '5.0': Add company domain on asset analytic accounts https://hg.tryton.org/modules/analytic_invoice/rev/56d673829a7e
New changeset b0b9a02023e8 by Sergi Almacellas Abellana in branch 'default': Add company domain on asset analytic accounts https://hg.tryton.org/tryton-env/rev/b0b9a02023e8
New changeset 23df221a67f3 by Sergi Almacellas Abellana in branch 'default': Add company domain on asset analytic accounts https://hg.tryton.org/modules/analytic_invoice/rev/23df221a67f3
El 10/10/19 a les 23:53, Cédric Krier ha escrit: > Do you plan to finish the patch? No, I'm unable to work on this now
Do you plan to finish the patch?
On 2018-05-24 10:50, Sergi Almacellas Abellana wrote: > > I think such domain should never depends on the context, so I would > > also update other modules to follow this rule. > > Current situation is that default values are not loaded if we do not > depend on the context. In which case? For SaleLine, the _parent_sale.company should always be available as sale is required. Idem for PurchaseLine. For InvoiceLine, I think it should use first 'company' and if not set, '_parent_invoice.company', one of those should always be set. > I'm wondering if we should not remove the context dependency with > issue4080 as we have to much dependency on the context now that is > hard to test the code when the context is not set (as currently you do > not have access to any company). issue4080 will take a lot of time to be solved. And indeed I think we should go progressively and this issue is one example of small steps that will ease to fix issue4080.
> I think such domain should never depends on the context, so I would also update other modules to follow this rule. Current situation is that default values are not loaded if we do not depend on the context. I'm wondering if we should not remove the context dependency with issue4080 as we have to much dependency on the context now that is hard to test the code when the context is not set (as currently you do not have access to any company).
I think such domain should never depends on the context, so I would also update other modules to follow this rule.
Then it's simpler as the domain is only missing on asset. review46471002 should fix it.
I think the Mixin can not have a generic domain for company. I would be in favor that each usage setup the correct domain depending on what is available. This will prevent to create technical fields when PYSON statement would be more efficient.
I have a database with two Companies: Company A and Company B. I have created an analytic account root for Company A, but not for company B. When I create an asset for Company A, there is no problem. But when I create an asset for Company B I get a domain validation error for the analytic accounts of the asset. This is because the default analytic_accounts of AnalyticMixin creates analytic accounts for every root, without taking in account it's domain.
keyword: - backport
|2020-04-18 17:45:07||roundup-bot||set||messages: + msg57274|
|2020-04-18 17:45:02||roundup-bot||set||status: testing -> resolved|
nosy: + roundup-bot
messages: + msg57273
|2020-04-17 18:11:13||pokoli||set||status: chatting -> testing|
|2020-04-17 17:56:01||ced||set||keyword: + backport|
|2019-10-11 11:17:37||ced||set||status: in-progress -> chatting|
|2019-10-11 11:04:33||pokoli||set||status: testing -> in-progress|
assignedto: pokoli -> (no value)
messages: + msg52408
|2019-10-10 23:53:06||ced||set||messages: + msg52397|
|2018-05-24 11:21:40||reviewbot||set||messages: + msg40999|
|2018-05-24 11:15:05||ced||set||messages: + msg40997|
|2018-05-24 10:50:05||pokoli||set||messages: + msg40996|
|2018-05-24 10:49:22||reviewbot||set||messages: + msg40995|
|2018-05-24 10:30:41||ced||set||messages: + msg40994|
|2018-05-24 10:27:43||pokoli||set||reviews: 43211002,46471002,45171002,45161002 -> 46471002|
messages: + msg40993
component: - analytic_account, analytic_purchase, analytic_sale
messages: + msg40990
|2018-05-21 12:27:42||pokoli||set||component: + analytic_invoice, analytic_purchase, analytic_sale|
|2018-05-21 12:26:40||pokoli||set||reviews: 43211002 -> 43211002,46471002,45171002,45161002|
|2018-05-21 12:19:57||reviewbot||set||messages: + msg40793|
|2018-05-18 12:17:48||pokoli||link||issue4080 superseder|
|2018-04-18 10:56:30||reviewbot||set||messages: + msg40214|
messages: + msg38863
|2018-03-08 11:19:37||pokoli||set||status: in-progress -> testing|
keyword: + review