-
-
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
[MIG]Migrated shop_by_brand module in v9. #103
Conversation
.. image:: https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas | ||
:alt: Try me on Runbot | ||
:target: https://runbot.odoo-community.org/runbot/113/50 | ||
For further information, please visit: |
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.
Don't put this.
Please fix PYLINT errors. |
@pedrobaeza Thanks for the updates. Will do this changes asap. Can you please help me to resolve the rst-syntax-error in travis ? Regards. |
…roved the license terms as defined in oca guidelines.
@pedrobaeza Can you please help me to fix the travis test regarding "Uses of a deprecated module openerp.osv" ? |
from openerp.http import request | ||
|
||
|
||
class WebSite(orm.Model): | ||
class WebSite(models.Model): | ||
_inherit = 'website' | ||
|
||
def sale_product_domain(self, cr, uid, ids, context=None): |
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.
Make this in new API (with @api.multi signature
)
Sorry for not answering before. I have been all day on travel. I see that you have already figure out how to resolve the Travis problems. |
Hope you are doing well. Thanks for the updates. I have updated the code as per your suggestion. Regards. |
@pedrobaeza Can we proceed for merge ? |
You have my 👍, but we can't merge yet. We need at least one review more. |
Code review 👍 (It would be better to squash all the commits!!) |
@atchuthan Thanks for the review. @yajo @rafaelbn Can you please review this PR ? Thanks. |
@@ -33,21 +37,35 @@ Based on this configuration, you will see the menuitem shop by brand under shop | |||
It will show all the brands and once you select that brand it will show product's which | |||
is related to this brand. | |||
|
|||
The blog here explains the HOWTO : |
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 remember a comment about it: should not we rather have the content of the blog in here? (Or at least a summary)
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.
Yes, please put here the content of the blog post. We want all the documentation auto-contained.
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.
@pedrobaeza @elicoidal I will update readme with blog content.
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.
@pedrobaeza @elicoidal Actually summary of is already added in the description part of the readme file.
By going through the blog, I think we can add road map in readme file ?
What are your suggestions ?
Thanks.
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.
Can't you make a summary of the post blog in the Usage section?
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.
@pedrobaeza @elicoidal Changed the usage section.
👍 |
domain.append( | ||
('product_brand_id', '=', request.env.context['brand_id'])) | ||
('product_brand_id', '=', request.context['brand_id'])) |
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.
When you are inside a model, you should use self.env.context
. request.context
is mainly for controllers.
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.
@yajo Thanks for the review, I will update the code soon.
|
||
To use this module, you need to: | ||
|
||
- Create Product brand, to create product brand | ||
- Install the module website_sale_product_brand. |
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.
This goes in Installation section, but it's obvious, so you can omit it.
👍 |
**post) | ||
result.qcontext['brand'] = brand | ||
return result | ||
context = dict(request.env.context) |
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.
we could use with_context() to update context values
self = self.with_context(brand_id= int(brand))
No description provided.