Skip to content
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

[ADD] product_supplierinfo_expand_view #107

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions product_supplierinfo_expand_view/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg
:alt: License: AGPL-3
================================
Product supplierinfo expand view
================================
This module expands product_supplierinfo view to show partner reference and
also product data on product procurements tab tree view.

Credits
=======

Contributors
------------
* Daniel Campos <danielcampos@avanzosc.es>
* Pedro M. Baeza <pedro.baeza@serviciosbaeza.com>
* Ana Juaristi <ajuaristio@gmail.com>
5 changes: 5 additions & 0 deletions product_supplierinfo_expand_view/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# -*- coding: utf-8 -*-
# (c) 2015 Daniel Campos <danielcampos@avanzosc.es> - Avanzosc S.L.
# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html

from . import models
18 changes: 18 additions & 0 deletions product_supplierinfo_expand_view/__openerp__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# -*- coding: utf-8 -*-
# (c) 2015 Daniel Campos - Avanzosc S.L.
# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html

{
"name": "Product Supplierinfo expand view",
"version": "1.0",
'author': 'OdooMRP team',
'website': "http://www.odoomrp.com",
'contributors': ["Daniel Campos <danielcampos@avanzosc.es>",
"Pedro M. Baeza <pedro.baeza@serviciosbaeza.com>",
"Ana Juaristi <ajuaristio@gmail.com>"],
"depends": ['product'],
"category": "Tools",
"data": ['views/product_supplierinfo_view.xml'
],
"installable": True
}
5 changes: 5 additions & 0 deletions product_supplierinfo_expand_view/models/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# -*- coding: utf-8 -*-
# (c) 2015 Daniel Campos <danielcampos@avanzosc.es> - Avanzosc S.L.
# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html

from . import product_supplierinfo
11 changes: 11 additions & 0 deletions product_supplierinfo_expand_view/models/product_supplierinfo.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# -*- coding: utf-8 -*-
# (c) 2015 Daniel Campos - Avanzosc S.L.
# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html

from openerp import models, fields, api


class ProductSupplierinfo(models.Model):
_inherit = 'product.supplierinfo'

partner_code = fields.Char(related='name.ref')
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<?xml version="1.0" encoding="UTF-8"?>
<openerp>
<data>
<record model="ir.ui.view" id="product_supplierinfo_form_view">
<field name="name">product.supplierinfo.form.view.ext</field>
<field name="model">product.supplierinfo</field>
<field name="inherit_id" ref="product.product_supplierinfo_form_view" />
<field name="arch" type="xml">
<field name="name" position="after">
<field name="partner_code" string="Partner Reference" />
</field>
</field>
</record>
<record id="product_supplierinfo_tree_view" model="ir.ui.view">
<field name="name">product.supplierinfo.tree.view</field>
<field name="model">product.supplierinfo</field>
<field name="inherit_id" ref="product.product_supplierinfo_tree_view" />
<field name="arch" type="xml">
<field name="name" position="after">
<field name="partner_code"/>
<field name="product_name"/>
<field name="product_code"/>
</field>
</field>
</record>
</data>
</openerp>