Skip to content
Open
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
5 changes: 5 additions & 0 deletions product_code/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# -*- encoding: utf-8 -*-


import models

20 changes: 20 additions & 0 deletions product_code/__openerp__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# -*- encoding: utf-8 -*-

{
'name': 'Product code',
'summary':'Product',
'version': '0.1',
'category': 'Product',
"author": "Linserv AB",
'website': 'http://www.xubi.me',
"license": "",
'depends': [
'stock','sale'
],
'data': [
'views/inherit_product_code.xml',

],


}
2 changes: 2 additions & 0 deletions product_code/models/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# -*- encoding: utf-8 -*-
from .import product_code
5 changes: 5 additions & 0 deletions product_code/models/product_code.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
from openerp.osv import fields, osv

class product_template(osv.osv):
_inherit = 'product.template'

Binary file added product_code/static/description/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
19 changes: 19 additions & 0 deletions product_code/views/inherit_product_code.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<record id="product_template_only_form_view" model="ir.ui.view">
<field name="name">product.template.form.view</field>
<field name="model">product.template</field>
<field name="inherit_id" ref="product.product_template_only_form_view"/>
<field name="arch" type="xml">
<xpath expr="//field[@name='default_code']" position="replace"/>
<xpath expr="//div[@class='oe_title']/h1" position="after">
<label class="oe_edit_only" for="default_code" string="Product code"/>
<field name="default_code" class="oe_inline"/>
</xpath>

</field>
</record>

</data>
</openerp>