[REF][IMP]GOLEM PreCreation : now from submenu on member module
This commit is contained in:
parent
671cb68b86
commit
f3e45b885d
@ -19,15 +19,14 @@
|
|||||||
{
|
{
|
||||||
'name': 'GOLEM Pre-creation search member',
|
'name': 'GOLEM Pre-creation search member',
|
||||||
'summary': 'Pre-creation search member',
|
'summary': 'Pre-creation search member',
|
||||||
'version': '10.0.0.0.0',
|
'version': '10.0.0.1.0',
|
||||||
'category': 'GOLEM',
|
'category': 'GOLEM',
|
||||||
'author': 'Fabien Bourgeois, Youssef El ouahby',
|
'author': 'Fabien Bourgeois, Youssef El ouahby',
|
||||||
'license': 'AGPL-3',
|
'license': 'AGPL-3',
|
||||||
'application': True,
|
'application': False,
|
||||||
'installable': True,
|
'installable': True,
|
||||||
'depends': ['golem_member', 'golem_family'],
|
'depends': ['golem_member'],
|
||||||
'data': ['views/golem_member_views.xml',
|
'data': ['views/golem_precreation_partner_menu.xml',
|
||||||
'views/partner_views.xml',
|
|
||||||
'wizard/golem_precreation_member_request_wizard_views.xml',
|
'wizard/golem_precreation_member_request_wizard_views.xml',
|
||||||
'wizard/golem_precreation_member_result_wizard_views.xml']
|
'wizard/golem_precreation_member_result_wizard_views.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, res_partner
|
from . import res_partner
|
||||||
|
@ -1,55 +0,0 @@
|
|||||||
# -*- coding: 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/>.
|
|
||||||
|
|
||||||
""" GOLEM Members """
|
|
||||||
|
|
||||||
|
|
||||||
from odoo import models, api, _
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
class GolemMember(models.Model):
|
|
||||||
""" GOLEM Member model """
|
|
||||||
_inherit = 'golem.member'
|
|
||||||
|
|
||||||
@api.multi
|
|
||||||
def precreation_search(self):
|
|
||||||
""" Precreation member search """
|
|
||||||
self.ensure_one()
|
|
||||||
return {
|
|
||||||
'name' : _('Please enter member searched'),
|
|
||||||
'type' : 'ir.actions.act_window',
|
|
||||||
'res_model' : 'golem.precreation.member.request.wizard',
|
|
||||||
'context' : {'default_is_member' : True},
|
|
||||||
'view_mode': 'form',
|
|
||||||
'target': 'new'
|
|
||||||
}
|
|
||||||
@api.multi
|
|
||||||
def open_line(self):
|
|
||||||
""" open member form """
|
|
||||||
self.ensure_one()
|
|
||||||
return {
|
|
||||||
'type': 'ir.actions.act_window',
|
|
||||||
'name': 'Member',
|
|
||||||
'view_type': 'form',
|
|
||||||
'view_mode': 'form',
|
|
||||||
'res_model': self._name,
|
|
||||||
'res_id': self.id,
|
|
||||||
'flags': {'initial_mode': 'edit'},
|
|
||||||
'target': 'current',
|
|
||||||
}
|
|
@ -18,11 +18,9 @@
|
|||||||
|
|
||||||
""" GOLEM Contact """
|
""" GOLEM Contact """
|
||||||
|
|
||||||
|
|
||||||
from odoo import models, api, _
|
from odoo import models, api, _
|
||||||
|
|
||||||
|
class ResPartner(models.Model):
|
||||||
class GolemMember(models.Model):
|
|
||||||
""" Res Partner extention """
|
""" Res Partner extention """
|
||||||
_inherit = 'res.partner'
|
_inherit = 'res.partner'
|
||||||
|
|
||||||
@ -37,9 +35,10 @@ class GolemMember(models.Model):
|
|||||||
'view_mode': 'form',
|
'view_mode': 'form',
|
||||||
'target': 'new'
|
'target': 'new'
|
||||||
}
|
}
|
||||||
|
|
||||||
@api.multi
|
@api.multi
|
||||||
def open_line(self):
|
def navigate_to_contact(self):
|
||||||
""" open contact form """
|
""" Navigates to contact form, in edit mode """
|
||||||
self.ensure_one()
|
self.ensure_one()
|
||||||
return {
|
return {
|
||||||
'type': 'ir.actions.act_window',
|
'type': 'ir.actions.act_window',
|
||||||
@ -47,7 +46,7 @@ class GolemMember(models.Model):
|
|||||||
'view_type': 'form',
|
'view_type': 'form',
|
||||||
'view_mode': 'form',
|
'view_mode': 'form',
|
||||||
'res_model': self._name,
|
'res_model': self._name,
|
||||||
'res_id': self.id,
|
'res_id': self[0].id,
|
||||||
'flags': {'initial_mode': 'edit'},
|
'flags': {'initial_mode': 'edit'},
|
||||||
'target': 'current',
|
'target': 'current'
|
||||||
}
|
}
|
||||||
|
@ -1,36 +0,0 @@
|
|||||||
<?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 id="golem_member_precreation_extention_form" model="ir.ui.view">
|
|
||||||
<field name="name">GOLEM Member Precreation extention Form</field>
|
|
||||||
<field name="model">golem.member</field>
|
|
||||||
<field name="inherit_id" ref="golem_member.golem_member_form"/>
|
|
||||||
<field name="arch" type="xml">
|
|
||||||
<xpath expr="//sheet" position="before">
|
|
||||||
<header>
|
|
||||||
<button name="precreation_search" type="object" string="Pre-creation search" class="oe_highlight"/>
|
|
||||||
</header>
|
|
||||||
</xpath>
|
|
||||||
</field>
|
|
||||||
</record>
|
|
||||||
</data>
|
|
||||||
</odoo>
|
|
@ -19,18 +19,19 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
|
|
||||||
<odoo>
|
<odoo>
|
||||||
<data>
|
<data>
|
||||||
<!-- Forms -->
|
|
||||||
<record id="res_partner_precreation_extention_form" model="ir.ui.view">
|
<!-- Actions -->
|
||||||
<field name="name">Res Partner Precreation extention Form</field>
|
<act_window id="golem_precreation_member_request_action"
|
||||||
<field name="model">res.partner</field>
|
name="Pre-creation contact search"
|
||||||
<field name="inherit_id" ref="base.view_partner_form"/>
|
res_model="golem.precreation.member.request.wizard"
|
||||||
<field name="arch" type="xml">
|
view_mode="form" target="new" />
|
||||||
<xpath expr="//sheet" position="before">
|
|
||||||
<header>
|
<!-- Menus -->
|
||||||
<button name="precreation_search" type="object" string="Pre-creation search" class="oe_highlight"/>
|
<menuitem id="golem_precreation_member_request_menu"
|
||||||
</header>
|
name="Pre-creation contact search"
|
||||||
</xpath>
|
parent="golem_member.golem_member_tool_menu" sequence="10"
|
||||||
</field>
|
action="golem_precreation_member_request_action"
|
||||||
</record>
|
groups="golem_base.group_golem_user" />
|
||||||
|
|
||||||
</data>
|
</data>
|
||||||
</odoo>
|
</odoo>
|
@ -32,7 +32,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
<field name="firstname"/>
|
<field name="firstname"/>
|
||||||
<field name="lastname"/>
|
<field name="lastname"/>
|
||||||
<field name="email"/>
|
<field name="email"/>
|
||||||
<button name="open_line" type="object" icon="fa fa-external-link" />
|
<button name="navigate_to_contact" type="object" icon="fa fa-external-link" />
|
||||||
</tree>
|
</tree>
|
||||||
</field>
|
</field>
|
||||||
<field name="contact_ids" readonly="1"
|
<field name="contact_ids" readonly="1"
|
||||||
@ -42,7 +42,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
<field name="firstname"/>
|
<field name="firstname"/>
|
||||||
<field name="lastname"/>
|
<field name="lastname"/>
|
||||||
<field name="email"/>
|
<field name="email"/>
|
||||||
<button name="open_line" type="object" icon="fa fa-external-link" />
|
<button name="navigate_to_contact" type="object" icon="fa fa-external-link" />
|
||||||
</tree>
|
</tree>
|
||||||
</field>
|
</field>
|
||||||
<footer>
|
<footer>
|
||||||
|
Loading…
Reference in New Issue
Block a user