Skip to content

Commit

Permalink
Merge 16ad366 into 1702be8
Browse files Browse the repository at this point in the history
  • Loading branch information
dulhaver committed Jan 6, 2015
2 parents 1702be8 + 16ad366 commit e8311b2
Show file tree
Hide file tree
Showing 11 changed files with 141 additions and 148 deletions.
27 changes: 0 additions & 27 deletions __unported__/product_brand/__init__.py

This file was deleted.

53 changes: 0 additions & 53 deletions __unported__/product_brand/__openerp__.py

This file was deleted.

49 changes: 0 additions & 49 deletions __unported__/product_brand/product_brand.py

This file was deleted.

30 changes: 30 additions & 0 deletions product_brand/__init__.py
@@ -0,0 +1,30 @@
# -*- encoding: utf-8 -*-
#####################################################################################
# # #
# product_brand for Odoo # #
# Copyright (C) 2009 NetAndCo (<http://www.netandco.net>). # #
# Copyright (C) 2011 Akretion Benoît Guillot <benoit.guillot@akretion.com> # #
# Copyright (C) 2014 prisnet.ch Seraphine Lantible <s.lantible@gmail.com> # #
# Contributors #
# Mathieu Lemercier, mathieu@netandco.net, # #
# Franck Bret, franck@netandco.net # #
# Seraphine Lantible, info@prisnet.ch, s.lantible@gmail.com, 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 #
#####################################################################################
import product_brand
57 changes: 57 additions & 0 deletions product_brand/__openerp__.py
@@ -0,0 +1,57 @@
# -*- encoding: utf-8 -*-
#####################################################################################
# # #
# product_brand for Odoo # #
# Copyright (C) 2009 NetAndCo (<http://www.netandco.net>). # #
# Copyright (C) 2011 Akretion Benoît Guillot <benoit.guillot@akretion.com> # #
# Copyright (C) 2014 prisnet.ch Seraphine Lantible <s.lantible@gmail.com> # #
# Contributors #
# Mathieu Lemercier, mathieu@netandco.net, # #
# Franck Bret, franck@netandco.net # #
# Seraphine Lantible, info@prisnet.ch, s.lantible@gmail.com, 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 #
#####################################################################################
{
'name': 'Product Brand Manager',
'version': '0.1',
'category': 'Product',
'summary' : ' brand',
'description': """
Product Brand Manager
=====================
This module allows your user 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. Once installed, check the menu
Product/configuration/brand
To do / To come:
- A view to seeing products by brand.
""",
'author': 'Prisnet Telecommunications SA ',
'website': 'http://www.prisnet.ch ',
'depends': ['product'],
'data': [
'product_brand_view.xml',
'security/ir.model.access.csv'
],
'installable': True,
}
File renamed without changes.
File renamed without changes.
File renamed without changes.
47 changes: 47 additions & 0 deletions product_brand/product_brand.py
@@ -0,0 +1,47 @@
# -*- encoding: utf-8 -*-
#####################################################################################
# # #
# product_brand for Odoo # #
# Copyright (C) 2009 NetAndCo (<http://www.netandco.net>). # #
# Copyright (C) 2011 Akretion Benoît Guillot <benoit.guillot@akretion.com> # #
# Copyright (C) 2014 prisnet.ch Seraphine Lantible <s.lantible@gmail.com> # #
# Contributors #
# Mathieu Lemercier, mathieu@netandco.net, # #
# Franck Bret, franck@netandco.net # #
# Seraphine Lantible, info@prisnet.ch, s.lantible@gmail.com, 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 openerp.osv import orm, fields


class product_brand(orm.Model):
_name = 'product.brand'
_columns = {
'name': fields.char('Brand Name'),
'description': fields.text('Description', translate=True),
'partner_id': fields.many2one('res.partner','partner', help='Select a partner for this brand if it exists.', ondelete='restrict'),
'logo': fields.binary('Logo File')
}


class product_template(orm.Model):
_inherit = 'product.template'
_columns = {
'product_brand_id': fields.many2one('product.brand','Brand', help='Select a brand for this product.')
}
@@ -1,10 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
product_brand for OpenERP
Copyright (C) 2009 NetAndCo (<http://www.netandco.net>).
Authors, Mathieu Lemercier, mathieu@netandco.net, Franck Bret, franck@netandco.net
product_brand for Odoo
Copyright (C) 2009 NetAndCo <http://www.netandco.net>.
Copyright (C) 2011 Akretion Benoît Guillot <benoit.guillot@akretion.com>
The licence is in the file __openerp__.py
Copyright (C) 2014 prisnet.ch Seraphine Lantible <s.lantible@gmail.com>
Contributors, Mathieu Lemercier <mathieu@netandco.net>, Franck Bret <franck@netandco.net>, Seraphine Lantible <s.lantible@gmail.com>
-->
<openerp>
<data>
Expand Down Expand Up @@ -71,25 +71,13 @@
</field>
</record>

<record model="ir.ui.view" id="normal_form_product_brand">
<field name="name">product.normal.form</field>
<field name="model">product.product</field>
<field name="inherit_id" ref="product.product_normal_form_view" />
<field name="arch" type="xml">
<div name="options" position="before">
<label for="product_brand_id" class="oe_edit_only"/>
<h2><field name="product_brand_id"/></h2>
</div>
</field>
</record>

<record model="ir.ui.view" id="product_template_form_brand_add">
<record model="ir.ui.view" id="product_template_form_brand_add">
<field name="name">product.template.product.form</field>
<field name="model">product.template</field>
<field name="inherit_id" ref="product.product_template_form_view" />
<field name="arch" type="xml">
<field name="categ_id" position="after" >
<field name="product_brand_id" />
<field name="name" position="after" >
<field name="product_brand_id" placeholder="Marque"/>
</field>
</field>
</record>
Expand Down
File renamed without changes.

0 comments on commit e8311b2

Please sign in to comment.