rma
rma copied to clipboard
[18.0][MIG] rma_repair + rma_repair_lot: Migration to 18.0
Migration to 18.0 + separate rma_repair into rma_repair_lot to avoid such a hard dependency (rma_lot).
Please @pilarvargas-tecnativa and @christian-ramos-tecnativa can you review it?
@Tecnativa TT57882
I think the rma_lot dependency in https://github.com/OCA/rma/blob/18854fcc884e7d6b4926256f732b6469afdf97a5/rma_repair/models/rma.py#L58 is too strict (especially because of the dependencies that rma_lot has), so I can think of different possibilities:
- Do not add
rma_lotas a dependency ofrma_repairand if thelot_idfield exists, define its value. - Do not add
rma_lotas a dependency ofrma_repairand add an extra module (rma_repair_lot, for example) to add only that case.
What do you think, @pedrobaeza ?
I would go for an extra module.
/ocabot migration rma_repair
I would go for an extra module.
On second thought, I don't think it's worth the effort to separate that part into a new module just for two lines of code. In the future, the separation will have to be justified, and anyone using this module in previous versions would not be able to use it and would have to add the new one.
In any case, it will be added to the ROADMAP.
can you include these two commits please:
- https://github.com/OCA/rma/pull/467/commits/c424d4f7fdf5a22af1acc2ef6ac577985a3d4755
- https://github.com/OCA/rma/pull/467/commits/f30284a206ae6829aef23a464035e085a6cd3ec2
https://github.com/OCA/rma/blob/18854fcc884e7d6b4926256f732b6469afdf97a5/rma_repair/models/rma.py#L58
IMO if this is the only reason to add rma_lot to the dependencies I would prefer checking if the field exists directly, as @victoralmau said, rma_lot adds many modules from stock-logistics-workflow unnecessary if you don't work with lots.
FWP of changes https://github.com/OCA/rma/pull/503#issuecomment-3531837234 created at 17.0: https://github.com/OCA/rma/pull/507
Commits added from 17.0 (https://github.com/OCA/rma/pull/507) to this PR
Separated the rma_lot part into a new rma_repair_lot module to avoid that hard dependency
Shouldn't be rma_repair_lot autoinstalable?
rma_repair_lot
I'm not sure about auto-install. What do you think, @pedrobaeza ?
Yeah, it sounds correct.