-
-
Notifications
You must be signed in to change notification settings - Fork 488
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
Changes from 5 commits
5464667
df1fe93
35e65a4
a8174eb
c89cd10
759c4b6
bcca6cd
44fe410
6368d8c
8cad4b9
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg | ||
:alt: License: AGPL-3 | ||
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html | ||
:alt: License: AGPL-3 | ||
|
||
========================== | ||
Website Sale Product Brand | ||
|
@@ -11,14 +12,17 @@ Description | |
This module was written to extend the functionality of product filtering on website. | ||
It will allow you to filter product based on its brand. | ||
|
||
This Module depends on product_brand module : | ||
->https://github.com/OCA/product-attribute/tree/8.0/product_brand | ||
|
||
While shopping online, we have seen various eShops having a feature to shop by brands | ||
which ODOO does not yet provide officially.Website Sale Product Brand fills the gap at certain | ||
extent and by providing basic search by brands, thus reducing end-user’s efforts in | ||
extent and by providing basic search by brands, thus reducing end-user’s efforts in | ||
searching the products he/she wants to purchase. | ||
|
||
Installation | ||
============ | ||
|
||
To install this module, you need to install following module: | ||
->https://github.com/OCA/product-attribute/tree/9.0/product_brand | ||
|
||
Usage | ||
===== | ||
|
||
|
@@ -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 : | ||
http://www.serpentcs.com/serpentcs-odoo-ecommerce-shop-brands-contribution | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Better to copy the blog content here in the section |
||
The Youtube Video is here : | ||
https://www.youtube.com/watch?feature=player_embedded&v=LkV5umivylw | ||
|
||
.. 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 | ||
|
||
The blog here explains the HOWTO : | ||
|
||
http://www.serpentcs.com/serpentcs-odoo-ecommerce-shop-brands-contribution | ||
|
||
The Youtube Video is here : | ||
Bug Tracker | ||
=========== | ||
|
||
https://www.youtube.com/watch?feature=player_embedded&v=LkV5umivylw | ||
Bugs are tracked on `GitHub Issues | ||
<https://github.com/OCA/e-commerce/issues>`_. In case of trouble, please | ||
check there if your issue has already been reported. If you spotted it first, | ||
help us smashing it by providing a detailed and welcomed `feedback | ||
<https://github.com/OCA/ | ||
e-commerce/issues/new?body=module:%20 | ||
website_sale_product_brand%0Aversion:%20 | ||
9.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_. | ||
|
||
Credits | ||
======= | ||
|
||
Images | ||
------ | ||
|
||
* Odoo Community Association: `Icon <https://github.com/OCA/maintainer-tools/blob/master/template/module/static/description/icon.svg>`_. | ||
|
||
Contributors | ||
------------ | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. below please replace https (x3) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @elicoidal I did not get it, Can you please explain ? Thanks. |
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,6 @@ | ||
# -*- coding: utf-8 -*- | ||
############################################################################## | ||
# | ||
# OpenERP, Open Source Management Solution | ||
# Copyright (C) 2012-Today Serpent Consulting Services Pvt. Ltd. | ||
# (<http://www.serpentcs.com>) | ||
# | ||
# This program is free software: you can redistribute it and/or modify | ||
# it under the terms of the GNU General Public License as published by | ||
# the Free Software Foundation, either version 3 of the License, or | ||
# (at your option) any later version. | ||
# | ||
# This program is distributed in the hope that it will be useful, | ||
# but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
# GNU General Public License for more details. | ||
# | ||
# You should have received a copy of the GNU General Public License | ||
# along with this program. If not, see <http://www.gnu.org/licenses/> | ||
# | ||
############################################################################## | ||
# © 2016 Serpent Consulting Services Pvt. Ltd. (http://www.serpentcs.com) | ||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). | ||
|
||
from . import controllers | ||
from . import models |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,5 @@ | ||
# -*- coding: utf-8 -*- | ||
############################################################################## | ||
# | ||
# OpenERP, Open Source Management Solution | ||
# Copyright (C) 2012-Today Serpent Consulting Services Pvt. Ltd. | ||
# (<http://www.serpentcs.com>) | ||
# | ||
# This program is free software: you can redistribute it and/or modify | ||
# it under the terms of the GNU General Public License as published by | ||
# the Free Software Foundation, either version 3 of the License, or | ||
# (at your option) any later version. | ||
# | ||
# This program is distributed in the hope that it will be useful, | ||
# but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
# GNU General Public License for more details. | ||
# | ||
# You should have received a copy of the GNU General Public License | ||
# along with this program. If not, see <http://www.gnu.org/licenses/> | ||
# | ||
############################################################################## | ||
# © 2016 Serpent Consulting Services Pvt. Ltd. (http://www.serpentcs.com) | ||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). | ||
|
||
from . import main |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,5 @@ | ||
# -*- coding: utf-8 -*- | ||
############################################################################## | ||
# | ||
# OpenERP, Open Source Management Solution | ||
# Copyright (C) 2012-Today Serpent Consulting Services Pvt. Ltd. | ||
# (<http://www.serpentcs.com>) | ||
# | ||
# This program is free software: you can redistribute it and/or modify | ||
# it under the terms of the GNU General Public License as published by | ||
# the Free Software Foundation, either version 3 of the License, or | ||
# (at your option) any later version. | ||
# | ||
# This program is distributed in the hope that it will be useful, | ||
# but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
# GNU General Public License for more details. | ||
# | ||
# You should have received a copy of the GNU General Public License | ||
# along with this program. If not, see <http://www.gnu.org/licenses/> | ||
# | ||
############################################################################## | ||
# © 2016 Serpent Consulting Services Pvt. Ltd. (http://www.serpentcs.com) | ||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). | ||
|
||
from . import website |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,36 +1,18 @@ | ||
# -*- coding: utf-8 -*- | ||
############################################################################## | ||
# | ||
# OpenERP, Open Source Management Solution | ||
# Copyright (C) 2012-Today Serpent Consulting Services Pvt. Ltd. | ||
# (<http://www.serpentcs.com>) | ||
# | ||
# This program is free software: you can redistribute it and/or modify | ||
# it under the terms of the GNU General Public License as published by | ||
# the Free Software Foundation, either version 3 of the License, or | ||
# (at your option) any later version. | ||
# | ||
# This program is distributed in the hope that it will be useful, | ||
# but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
# GNU General Public License for more details. | ||
# | ||
# You should have received a copy of the GNU General Public License | ||
# along with this program. If not, see <http://www.gnu.org/licenses/> | ||
# | ||
############################################################################## | ||
# © 2016 Serpent Consulting Services Pvt. Ltd. (http://www.serpentcs.com) | ||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). | ||
|
||
from openerp.osv import orm | ||
from openerp import models | ||
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 commentThe reason will be displayed to describe this comment to others. Learn more. Make this in new API (with |
||
domain = super(WebSite, self).sale_product_domain(cr, uid, ids=ids, | ||
context=context) | ||
if 'brand_id' in request.env.context: | ||
if 'brand_id' in request.context: | ||
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 commentThe reason will be displayed to describe this comment to others. Learn more. When you are inside a model, you should use There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @yajo Thanks for the review, I will update the code soon. |
||
return domain |
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.