Prechádzať zdrojové kódy

Coloca referencia interna en la vista lista de productos

sebas 4 rokov pred
commit
d6742e4771

+ 31 - 0
__init__.py

@@ -0,0 +1,31 @@
+# -*- 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, 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 . import product

+ 40 - 0
__openerp__.py

@@ -0,0 +1,40 @@
+# -*- 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, 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/>. #      #
+# #                                                                           #
+###############################################################################
+
+{
+    'name': 'Product Tree View Internal Reference Sortable',
+    'version': '8.0.0.1.0',
+    'category': 'Product',
+    'summary': 'Add Internal Reference to Product Tree View',
+    'author': 'Sebastian Penayo, Eiru SOftware S.A.',
+    'license': 'AGPL-3',
+    'depends': ['sale','product'],
+    'data': [
+        'product_tree_view_internal_reference_sort.xml'
+    ],
+    'installable': True,
+}

+ 36 - 0
product.py

@@ -0,0 +1,36 @@
+# -*- 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>     #
+# Copyright (C) 2015 Leonardo Donelli                                         #
+# Contributors                                                                #
+# Mathieu Lemercier, mathieu@netandco.net                                     #
+# Franck Bret, franck@netandco.net                                            #
+# Seraphine Lantible, s.lantible@gmail.com, http://www.prisnet.ch             #
+# Leonardo Donelli, donelli@webmonks.it, http://www.wearemonk.com             #
+#                                                                             #
+# 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/>.        #
+#                                                                             #
+###############################################################################
+
+from openerp.osv import fields, osv
+
+class product_template(osv.osv):
+    _inherit = 'product.template'
+    _columns = {
+    'default_code': fields.related('product_variant_ids', 'default_code', type='char', string='Internal Reference', store=True),
+    }

+ 16 - 0
product_tree_view_internal_reference_sort.xml

@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="utf-8"?>
+<openerp>
+      <data>
+          <record id="product_template_tree_view_internal_reference_sortable" model="ir.ui.view">
+              <field name="name">product.template.tree.view.internal.reference.sortable</field>
+              <field name="model">product.template</field>
+              <field name="type">tree</field>
+              <field name="inherit_id" ref="product.product_template_tree_view"/>
+              <field name="arch" type="xml">
+                  <field name="name" position="before">
+                      <field name="default_code"/>
+                  </field>
+              </field>
+          </record>
+      </data>
+</openerp>

BIN
static/description/icon.png