forked from Yaltik/golem
[ADD]GOLEM PCS : move to partner, add on partner forms
This commit is contained in:
parent
518749b78f
commit
d00462aa41
@ -27,5 +27,6 @@
|
|||||||
'installable': True,
|
'installable': True,
|
||||||
'depends': ['golem_member'],
|
'depends': ['golem_member'],
|
||||||
'data': ['views/golem_member_views.xml',
|
'data': ['views/golem_member_views.xml',
|
||||||
|
'views/res_partner_views.xml',
|
||||||
'data/golem_pcs_data.xml']
|
'data/golem_pcs_data.xml']
|
||||||
}
|
}
|
||||||
|
@ -16,4 +16,4 @@
|
|||||||
# You should have received a copy of the GNU Affero General Public License
|
# 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/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
from . import golem_member, golem_pcs
|
from . import res_partner, golem_pcs
|
||||||
|
@ -16,13 +16,13 @@
|
|||||||
# You should have received a copy of the GNU Affero General Public License
|
# 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/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
""" GOLEM Member adaptations """
|
""" Partner adaptations """
|
||||||
|
|
||||||
from odoo import models, fields
|
from odoo import models, fields
|
||||||
|
|
||||||
class GolemMember(models.Model):
|
class ResPartner(models.Model):
|
||||||
""" GOLEM Member extention """
|
""" Partner extention """
|
||||||
_inherit = 'golem.member'
|
_inherit = 'res.partner'
|
||||||
|
|
||||||
pcs_id = fields.Many2one('golem.pcs', string='PCS', index=True,
|
pcs_id = fields.Many2one('golem.pcs', string='PCS', index=True,
|
||||||
help='Professions and Socioprofessional Categories')
|
help='Professions and Socioprofessional Categories')
|
48
golem_pcs/views/res_partner_views.xml
Normal file
48
golem_pcs/views/res_partner_views.xml
Normal file
@ -0,0 +1,48 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
|
||||||
|
<!--
|
||||||
|
Copyright 2018 Youssef El Ouahby <youssef@yaltik.com>
|
||||||
|
Copyright 2018 Fabien Bourgeois <fabien@yaltik.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/>.
|
||||||
|
-->
|
||||||
|
|
||||||
|
<odoo>
|
||||||
|
<data>
|
||||||
|
|
||||||
|
<!-- Forms -->
|
||||||
|
<record model="ir.ui.view" id="res_partner_form_inherit_golem_pcs">
|
||||||
|
<field name="name">Partner Form PCS adaptations</field>
|
||||||
|
<field name="model">res.partner</field>
|
||||||
|
<field name="inherit_id" ref="base.view_partner_form" />
|
||||||
|
<field name="arch" type="xml">
|
||||||
|
<field name='function' position='after'>
|
||||||
|
<field name='pcs_id' options="{'no_create':True}" />
|
||||||
|
</field>
|
||||||
|
</field>
|
||||||
|
</record>
|
||||||
|
|
||||||
|
<!-- Search -->
|
||||||
|
<record model="ir.ui.view" id="view_partner_search_inherit_golem_pcs">
|
||||||
|
<field name="name">Partner Search PCS adaptations</field>
|
||||||
|
<field name="model">res.partner</field>
|
||||||
|
<field name="inherit_id" ref="base.view_res_partner_filter" />
|
||||||
|
<field name="arch" type="xml">
|
||||||
|
<field name='category_id' position='after'>
|
||||||
|
<field name='pcs_id' />
|
||||||
|
</field>
|
||||||
|
</field>
|
||||||
|
</record>
|
||||||
|
</data>
|
||||||
|
</odoo>
|
Loading…
Reference in New Issue
Block a user