[7.0] [ADD] web_note and web_note_test (#216)

This commit is contained in:
Nikolina Todorova
2016-10-25 21:41:38 +02:00
committed by Pedro M. Baeza
parent 09ee5fd70c
commit e73038b836
12 changed files with 325 additions and 0 deletions

View File

@@ -0,0 +1,5 @@
# -*- coding: utf-8 -*-
# © initOS GmbH 2014
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from . import web_note
from . import res_partner

View File

@@ -0,0 +1,26 @@
# -*- coding: utf-8 -*-
# © initOS GmbH 2014
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
{
'name': 'Web Note Test',
'version': '7.0.1.0.0',
'author': 'initOS GmbH',
'category': '',
'description':
"""
This module is example of the use of the web_note module.
""",
'website': 'http://www.initos.com',
'license': 'AGPL-3',
'images': [],
'depends': [
"base",
"sale",
"web_note",
],
'data': [
"res_partner_view.xml",
],
'active': False,
'installable': True
}

View File

@@ -0,0 +1,12 @@
# -*- coding: utf-8 -*-
# © initOS GmbH 2014
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from openerp.osv import orm, fields
class res_partner(orm.Model):
_inherit = 'res.partner'
_columns = {
'notes': fields.one2many('web.note', 'partner_id', 'Notes')
}

View File

@@ -0,0 +1,16 @@
<?xml version="1.0"?>
<openerp>
<data>
<record id="res_partner_view_buttons" model="ir.ui.view">
<field name="name">res.partner.view.buttons</field>
<field name="model">res.partner</field>
<field name="inherit_id" ref="base.view_partner_form" />
<field name="priority" eval="20"/>
<field name="arch" type="xml">
<xpath expr="//notebook" position="after">
<field name="notes"/>
</xpath>
</field>
</record>
</data>
</openerp>

View File

@@ -0,0 +1,12 @@
# -*- coding: utf-8 -*-
# © initOS GmbH 2014
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from openerp.osv import orm, fields
class WebNote(orm.Model):
_inherit = 'web.note'
_columns = {
'partner_id':
fields.many2one('res.partner', 'Partner Id', invisible=True),
}