mirror of
https://github.com/OCA/web.git
synced 2025-02-22 13:21:25 +02:00
[7.0] [ADD] web_note and web_note_test (#216)
This commit is contained in:
committed by
Pedro M. Baeza
parent
09ee5fd70c
commit
e73038b836
5
web_note/web_note_test/__init__.py
Normal file
5
web_note/web_note_test/__init__.py
Normal 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
|
||||
26
web_note/web_note_test/__openerp__.py
Normal file
26
web_note/web_note_test/__openerp__.py
Normal 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
|
||||
}
|
||||
12
web_note/web_note_test/res_partner.py
Normal file
12
web_note/web_note_test/res_partner.py
Normal 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')
|
||||
}
|
||||
16
web_note/web_note_test/res_partner_view.xml
Normal file
16
web_note/web_note_test/res_partner_view.xml
Normal 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>
|
||||
12
web_note/web_note_test/web_note.py
Normal file
12
web_note/web_note_test/web_note.py
Normal 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),
|
||||
}
|
||||
Reference in New Issue
Block a user