-
-
Notifications
You must be signed in to change notification settings - Fork 482
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[10.0] add product template multi link #210
[10.0] add product template multi link #210
Conversation
Isn't better to handle both links in the same module? |
+1 to work on template on this topic 90% of use cases. Thanks a lot for this valuable work. |
Hi @pedrobaeza and @bealdav. Thanks for your review. Indeed it could be great to handle both links in the same module (or at least make one depend of the other). I began with that approach but the problem is that I can not change product_multi_links, without breaking current behaviour (product produt will be now optional, (for the time being mandatory). And the OCA module is used by many people, and via connector. So if I change 10.0 version, I will break some shops (magento / prestashop) in production. For the V11, it will be maybe interesting to merge both modules ( the branch is currently empty with a simple migration script.) if it is possible and desired. I mean :
kind regards. |
cc @guewen as you wrote or touched product_multi_links may be you have an opinion on this. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good work !
As the existing module will need some refactor and supporting both solution will be note that easy to do if we want to have a good UI for the end user !
I think it will be better to accept this module in 10 and then to refactor in 11.
Also I confirm that adding link on variant is most of the time useless (In reality I never had a customer that ask me this feature so...). Does someone have the case?
linked_product_template_image_small = fields.Binary( | ||
related='linked_product_template_id.image_small') | ||
|
||
type = fields.Selection( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe better to use link_type as type already mean something in python
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your review. type renamed in link_type.
regard.
To summarize. Solution 1 :2 models. One with link between product.product (variant), one with product.template (products). this is the current approach of my PR. In that case, there is nothing to mutualise between the two models, so two modules seems to be the best way to avoid to install unnecessary features.
Solution 2 :1 models with :
Impact :
So my PoV : let's go accept this PR for v10, because There Is No Alternative ;-). for the V11, I let e-commerce experts choosing what is the best choice. (I'm not an e-commerce expert), but I really think that the solution 2 is very more complicated on UI implementation. (overloading variant / template form, etc...) as said by @sebastienbeau. CC Initial commiters : @atchuthan, @guewen, @sebastienbeau kind regards. |
@legalsylvain about naming (not blocking). |
Hi @bealdav Well for the time being (after my PR) the name will be :
(should be renamed into product_product_multi_link or product_variant_multi_link in V11, I thinks) I don't think that the technical name should feat perfectly with the friendly name, because technical name should be understandable for technical people, and friendly name to Functional people. I don't think either it's an OCA convention. Exemple : https://github.com/OCA/web/tree/10.0/web_tree_dynamic_colored_field But well, if it's not correct for you, please make a better precise proposal. (for the current V10 PR) regards. |
You're right it's not an OCA convention, but I don't want propose any guideline without acceptance of the community. technical : What if somebody provide a module named : Some more ambiguous example could be found, for sure. Globally in think developpers use friendly name instead of In french there is proverb: It seems to me easier when simple things stay simple (in computer engineering some things are not simple). But as told above, if I can't convince others, probably that my point of view isn't good enough, then no needs more guideline Thanks for sharing you opinion @pedrobaeza @sebastienbeau etc, etc. |
@legalsylvain as said not blocking for me |
31fae83
to
e69602d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A great module!
Add a new module product_template_multi_link based on the same concept as product_multi_link, but for template, instead of variants.
In many cases, link between templates is suficient and linking each variant could be very fastidious.
See README file for the complete description
Product form
![product_template_form](https://user-images.githubusercontent.com/3407482/31292112-745b77fc-aad2-11e7-9e6f-4a84b41877bd.png)
Linking new template (tree editable)
![product_template_link_tree_edit](https://user-images.githubusercontent.com/3407482/31292127-823c6cc8-aad2-11e7-97b7-1c7349aca5a2.png)
Extra Kanban view, for better visualization
![product_template_link_kanban](https://user-images.githubusercontent.com/3407482/31292142-8f9ed252-aad2-11e7-8f40-e2a2d8036bfe.png)
Note, i didn't changed product_multi_link, to avoid to break existing instance that use it since a while.