-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[MIG] product_brand :Updated module as per v9
- Loading branch information
1 parent
4d6ee62
commit a4b5bc9
Showing
7 changed files
with
116 additions
and
192 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1,32 @@ | ||
Product Brand Manager [product_brand] | ||
===================================== | ||
.. image:: https://img.shields.io/badge/license-AGPLv3-blue.svg | ||
:target: https://www.gnu.org/licenses/agpl.html | ||
:alt: License: AGPL-3 | ||
|
||
This module allows odoo users to easily manage product brands. You can | ||
define brands, attach a logo and a description to them. | ||
It also allows to attach a partner to a brand. | ||
===================== | ||
Product Brand Manager | ||
===================== | ||
|
||
Installation | ||
============ | ||
This module introduce the following features: | ||
|
||
To install this module, you need to: | ||
* This module allows odoo users to easily manage product brands. | ||
|
||
* git clone https://github.com/OCA/product_attribute --branch 8.0 | ||
* make it available to odoo by adding its location to the addons_path in | ||
/etc/odoo-server.conf | ||
* You can define brands, attach a logo and a description to them. | ||
|
||
Configuration | ||
* It also allows to attach a partner to a brand. | ||
|
||
Installation | ||
============= | ||
|
||
To configure this module, you need to: | ||
No external library is used. | ||
|
||
Configuration | ||
============= | ||
|
||
* no configuration required | ||
No configuration is required. | ||
|
||
Usage | ||
===== | ||
|
||
To use this module, you need to: | ||
|
||
* go to ... | ||
|
||
For further information, please visit: | ||
|
||
|
@@ -35,22 +35,28 @@ For further information, please visit: | |
Known issues / Roadmap | ||
====================== | ||
|
||
* add a field with brands assiciated to a Customer or Supplier on | ||
the Customers/Suppliers Form View | ||
* Add a field with brands assiciated to a Customer or Supplier on | ||
the Customers/Suppliers Form View. | ||
|
||
|
||
Bug Tracker | ||
=========== | ||
|
||
Bugs are tracked on `GitHub Issues <https://github.com/OCA/product-attribute/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 | ||
Bugs are tracked on `GitHub Issues | ||
<https://github.com/OCA/product-attribute/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 | ||
`here <https://github.com/OCA/product-attribute/issues/new?body=module:%20product_brand%0Aversion:%208.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 | ||
------------ | ||
|
||
|
@@ -59,6 +65,7 @@ Contributors | |
* Seraphine Lantible <[email protected]> | ||
* Gunnar Wagner <[email protected]> | ||
* Leonardo Donelli <[email protected]> | ||
* Serpent Consulting Services Pvt. Ltd. <[email protected]> | ||
|
||
Maintainer | ||
---------- | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,9 @@ | ||
# -*- encoding: utf-8 -*- | ||
############################################################################### | ||
# # # | ||
# product_brand for Odoo # # | ||
# Copyright (C) 2009 NetAndCo (<http://www.netandco.net>). # # | ||
# Copyright (C) 2011 Akretion Benoît Guillot <[email protected]> # # | ||
# Copyright (C) 2014 prisnet.ch Seraphine Lantible <[email protected]> # # | ||
# Contributors # | ||
# Mathieu Lemercier, [email protected], # # | ||
# Franck Bret, [email protected] # # | ||
# Seraphine Lantible, [email protected], http://www.prisnet.ch # | ||
# # # | ||
# This program is free software: you can redistribute it and/or modify # # | ||
# it under the terms of the GNU Affero 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 Affero General Public License for more details. # # | ||
# # # | ||
# You should have received a copy of the GNU Affero General Public License # # | ||
# along with this program. If not, see <http://www.gnu.org/licenses/>. # # | ||
# # # | ||
############################################################################### | ||
############################################################################### | ||
# Product Brand is an Openobject module wich enable Brand management # | ||
# for products # | ||
############################################################################### | ||
from . import product_brand | ||
# -*- coding: utf-8 -*- | ||
# © 2009 NetAndCo (<http://www.netandco.net>). | ||
# © 2011 Akretion Benoît Guillot <[email protected]> | ||
# © 2014 prisnet.ch Seraphine Lantible <[email protected]> | ||
# © 2016-Today Serpent Consulting Services Pvt. Ltd. | ||
# (<http://www.serpentcs.com>) | ||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html) | ||
|
||
from . import models |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,45 +1,25 @@ | ||
# -*- encoding: utf-8 -*- | ||
############################################################################### | ||
# # # | ||
# product_brand for Odoo # # | ||
# Copyright (C) 2009 NetAndCo (<http://www.netandco.net>). # # | ||
# Copyright (C) 2011 Akretion Benoît Guillot <[email protected]> # # | ||
# Copyright (C) 2014 prisnet.ch Seraphine Lantible <[email protected]> # # | ||
# Contributors # | ||
# Mathieu Lemercier, [email protected], # # | ||
# Franck Bret, [email protected] # # | ||
# Seraphine Lantible, [email protected], http://www.prisnet.ch # | ||
# # # | ||
# This program is free software: you can redistribute it and/or modify # # | ||
# it under the terms of the GNU Affero 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 Affero General Public License for more details. # # | ||
# # # | ||
# You should have received a copy of the GNU Affero General Public License # # | ||
# along with this program. If not, see <http://www.gnu.org/licenses/>. # # | ||
# # # | ||
############################################################################### | ||
############################################################################### | ||
# Product Brand is an Openobject module wich enable Brand management for # | ||
# products # | ||
############################################################################### | ||
# -*- coding: utf-8 -*- | ||
# © 2009 NetAndCo (<http://www.netandco.net>). | ||
# © 2011 Akretion Benoît Guillot <[email protected]> | ||
# © 2014 prisnet.ch Seraphine Lantible <[email protected]> | ||
# © 2016-Today Serpent Consulting Services Pvt. Ltd. | ||
# (<http://www.serpentcs.com>) | ||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html) | ||
|
||
{ | ||
'name': 'Product Brand Manager', | ||
'version': '8.0.0.1.0', | ||
'version': '9.0.1.0.0', | ||
'category': 'Product', | ||
'summary': 'Add brand to products', | ||
'summary': "Product Brand Manager", | ||
'author': 'NetAndCo, Akretion, Prisnet Telecommunications SA' | ||
', MONK Software, Odoo Community Association (OCA)', | ||
', MONK Software, Odoo Community Association (OCA)' | ||
', SerpentCS Pvt. Ltd.', | ||
'license': 'AGPL-3', | ||
'depends': ['product'], | ||
'data': [ | ||
'product_brand_view.xml', | ||
'views/product_brand_view.xml', | ||
'security/ir.model.access.csv' | ||
], | ||
'installable': True, | ||
'installable': False, | ||
'auto_install': False | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# -*- coding: utf-8 -*- | ||
# © 2009 NetAndCo (<http://www.netandco.net>). | ||
# © 2011 Akretion Benoît Guillot <[email protected]> | ||
# © 2014 prisnet.ch Seraphine Lantible <[email protected]> | ||
# © 2016-Today Serpent Consulting Services Pvt. Ltd. | ||
# (<http://www.serpentcs.com>) | ||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html) | ||
|
||
from . import product_brand |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
# -*- coding: utf-8 -*- | ||
# © 2009 NetAndCo (<http://www.netandco.net>). | ||
# © 2011 Akretion Benoît Guillot <[email protected]> | ||
# © 2014 prisnet.ch Seraphine Lantible <[email protected]> | ||
# © 2016-Today Serpent Consulting Services Pvt. Ltd. | ||
# (<http://www.serpentcs.com>) | ||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html) | ||
|
||
from openerp import api, fields, models | ||
|
||
|
||
class ProductBrand(models.Model): | ||
_name = 'product.brand' | ||
|
||
name = fields.Char('Brand Name', required=True) | ||
description = fields.Text('Description', translate=True) | ||
partner_id = fields.Many2one( | ||
'res.partner', | ||
string='Partner', | ||
help='Select a partner for this brand if any.', | ||
ondelete='restrict' | ||
) | ||
logo = fields.Binary('Logo File') | ||
product_ids = fields.One2many( | ||
'product.template', | ||
'product_brand_id', | ||
string='Brand Products', | ||
) | ||
products_count = fields.Integer( | ||
string='Number of products', | ||
compute='_get_products_count', | ||
) | ||
|
||
@api.one | ||
@api.depends('product_ids') | ||
def _get_products_count(self): | ||
self.products_count = len(self.product_ids) | ||
|
||
|
||
class ProductTemplate(models.Model): | ||
_inherit = 'product.template' | ||
|
||
product_brand_id = fields.Many2one( | ||
'product.brand', | ||
string='Brand', | ||
help='Select a brand for this product' | ||
) |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.