-
-
Notifications
You must be signed in to change notification settings - Fork 63
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
[ADD] website_attribute_set: add a module to show custom attributes in website #202
base: 18.0
Are you sure you want to change the base?
Conversation
34ee1f1
to
4916642
Compare
4916642
to
de1886c
Compare
|
4a50584
to
5d11aa0
Compare
5d11aa0
to
8189fb9
Compare
ba36246
to
2e125eb
Compare
1007f1a
to
c5d3d1f
Compare
80cfe16
to
b790f1f
Compare
b790f1f
to
0177c34
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.
I tested on Runbot an it seems not working inside product: attributes are always visible; on the list view it is ok.
Maybe I'm doing something wrong.
ed: I filled my lack, all goes well
did you use pim before? |
No |
watch this video |
Thanks, now I see the option. |
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.
Functional test LGTM
bfa83c1
to
bd26740
Compare
can we review this new module? |
bd26740
to
d7c80aa
Compare
extra_domain = [(attribute.name, "ilike", float(search_term))] | ||
extra_domains.append(extra_domain) | ||
except ValueError as e: | ||
_logger.info(f"{e}") |
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.
_logger.info(f"{e}") | |
_logger.warning(f"{e}") |
This is an error value that should be warning instead of logged as information.
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.
remember it iw a website, and website users must do mistakes but we must ignore their mistakes as we expect and handle properly it should be our job in the background
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.
I am even thinking of not logging the error in production as it can come from the seach function in website which should be not important to log
SequenceMatcher(None, attribute.field_description, search_term).ratio() | ||
* 100 | ||
) | ||
if similarity > 80: |
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.
if similarity > 80: | |
if similarity > 80: |
What do we base this number (80
) on and should we hard code it?
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.
it is a percentage of similarity like 80% alike
groups[attribute.attribute_group_id][attribute][product] = ( | ||
values.mapped("name") | ||
) | ||
|
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.
remove empty line in a function
Hello @kobros-tech. As you see I'm making some efforts to help merging a few more basic odoo-pim PRs you made as I'm interested in that too. However I'm afraid, I'm not sure I'll be able to get as far as this website module in the time window you need, but I might try, To give you some context, I'm the guy who made the early odoo PIM prototype 15 years ago when the OCA was still incubating on Launchpad. I'm also the Akretion founder. Initially we made these modules to offer the same kind of product attributes flexibility you get with the Magento "EAV" model, but with a decent no-SQL design for performance. Then I also push and prototyped Shopinvader which is our open source e-commerce solution at Akretion for 10 years now. Indeed 10 years ago, the Odoo e-commerce was a big joke to say the least and Shopinvader allowed us to support the big customers that were using Magento initially. There would also be a lot to be told about Odoo security the way it was 10 years ago to give arbitrary ecommerce users permissions to try hacking into your ERP (extremly large attack surface). That being said, 10 years ago Odoo started to actively "canibalize" its initial beloved "partners" to please its investors and turn OpenERP into a license and SaaS business. In that context, we in Brazil had to advance what is just the most complex localization in the world like crazy to keep up with the Odoo marketing starting to sell Odoo as a turnkey ERP and not as an ERP framework anymore (OpenERP). I had to give up a bit on Shopinvader and the PIM modules to make miracles in OCA/l10n-brazil (the biggest OCA repo). As for now, the Odoo ecommerce starts to be decent and Shopinvader, while extremely scalable, has a much higher entry barrier. For the kind of companies, that are broke and are not technology aware, we usually deal with in Brazil, the native Odoo e-commerce seems finally like a viable option. So I'm extremely happy to see guys like you bringing these Shopinvader features to the native Odoo ecommerce stack. I also recently told @sebastienbeau I think it would be cool if Shopinvader could have a simple mode were it could simply reuse the Odoo cart and cookie system which seems finally scalable and decent so eventually more things could be shared between the two stacks and shopinvader could be just a set of extra modules you would add when you need psycopath scalability or want to design your shop frontend using the latest sexiest "full stack" framework, possibly with the AI tools popping all over the place. Also Postgres starts to compete a bit with Elastic and Elastic went to the dark side of the open source. With Odoo now starting to support hitting Postgres replicae for its website, the line with hitting the Elastic store is becoming blurred, so that's one more reason to reconsider using more of the Odoo ecommerce stack. cc @sbidoul @lmignon @simahawk @hparfr @pedrobaeza @JordiBForgeFlow |
Thanks @rvalyi very much, it's my pleasure to support my work. I know you and your very good work, that is included within shopinvader. I hade little talk with @lmignon, but it was not successful. I could fix some issues with his fs_storage a year a ago, and it was my beginning at OCA. Now, I did contribution in most of OCA projects and going to upgrade them and optimise. Thanks to @kencove and MR. Don who pushed me fast forward and he is my employer now. I dare to say that a business man like him and an ambitious guy like me with the team of Kencove made this, so our work here is business bearing work. When I was alone I tried to contact you to upgrade Shopinvader forward but didn't succeed as I mentioned above. I think it is a great opportunity to cooperate all of us as OCA members and entities to create positive projects that are striking and business attractive. we still are working on that module and I guess MR. Don does not mind if we share ideas and contributions in this module or any coming ones. I admit that we depend on your work of fastapi and file storage and we plan to test case all modules that still need test cases and of course migrations, I guess @pedrobaeza @lmignon @sbidoul and of course @JordiBForgeFlow interacted with me while I am doing fixing and migration. In brief I was waiting for a moment when we as a community help eachother for personal sake and all of us as I alone cannot build all of this alone and that is why we have a community like OCA. 💚 |
Here is the update: |
59be8e8
to
699e3a8
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.
Odoo native is using this template to display the attributes (ref). the current change is fine for me, thanks for your effort.
LGTM.
This new module is based on pim module and attribute_set and product_attribute_set
By default it is based on website, website_sale as we will display our OCA additional attributes in e-commerce website app.
We plan to optimize it so user can filter, search and choose products based on OCA attributes there.
Dependencies: