[REF]Global modularisation refactoring, end
This commit is contained in:
parent
6601bed446
commit
e99374796b
@ -1,3 +1 @@
|
|||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
from . import models
|
|
||||||
|
@ -16,16 +16,15 @@
|
|||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
{
|
{
|
||||||
'name': 'Coworking',
|
'name': 'Coworking whole Application',
|
||||||
'summary': 'yaltik coworking module simplify your coworking gerance',
|
'summary': 'yaltik coworking module simplify your coworking gerance',
|
||||||
'description': """ yaltik coworking module simplify your coworking gerance """,
|
'description': """ yaltik coworking module simplify your coworking gerance """,
|
||||||
'version': '10.0.0.0.1',
|
'version': '10.0.0.0.1',
|
||||||
'category': 'Useless',
|
'category': 'Coworking',
|
||||||
'author': 'Yaltik',
|
'author': 'Yaltik',
|
||||||
'license': 'AGPL-3',
|
'license': 'AGPL-3',
|
||||||
'application': False,
|
'application': True,
|
||||||
'installable': True,
|
'installable': True,
|
||||||
'data': ['views/coworking_menu.xml', 'views/coworker_views.xml',
|
'data': [],
|
||||||
'security/ir.model.access.csv', 'views/event_menu.xml', 'views/event_views.xml'],
|
'depends': ['coworking_coworker', 'coworking_event']
|
||||||
'depends': ['base']
|
|
||||||
}
|
}
|
||||||
|
@ -1,3 +1 @@
|
|||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
from . import models
|
|
||||||
|
@ -16,16 +16,14 @@
|
|||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
{
|
{
|
||||||
'name': 'Coworking',
|
'name': 'Coworking base',
|
||||||
'summary': 'yaltik coworking module simplify your coworking gerance',
|
'summary': 'yaltik coworking module simplify your coworking gerance',
|
||||||
'description': """ yaltik coworking module simplify your coworking gerance """,
|
'description': """ yaltik coworking module simplify your coworking gerance """,
|
||||||
'version': '10.0.0.0.1',
|
'version': '10.0.0.0.1',
|
||||||
'category': 'Useless',
|
'category': 'Coworking',
|
||||||
'author': 'Yaltik',
|
'author': 'Yaltik',
|
||||||
'license': 'AGPL-3',
|
'license': 'AGPL-3',
|
||||||
'application': False,
|
'application': False,
|
||||||
'installable': True,
|
'installable': True,
|
||||||
'data': ['views/coworking_menu.xml', 'views/coworker_views.xml',
|
|
||||||
'security/ir.model.access.csv', 'views/event_menu.xml', 'views/event_views.xml'],
|
|
||||||
'depends': ['base']
|
'depends': ['base']
|
||||||
}
|
}
|
||||||
|
@ -16,16 +16,17 @@
|
|||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
{
|
{
|
||||||
'name': 'Coworking',
|
'name': 'Coworking coworker',
|
||||||
'summary': 'yaltik coworking module simplify your coworking gerance',
|
'summary': 'yaltik coworking module simplify your coworking gerance',
|
||||||
'description': """ yaltik coworking module simplify your coworking gerance """,
|
'description': """ yaltik coworking module simplify your coworking gerance """,
|
||||||
'version': '10.0.0.0.1',
|
'version': '10.0.0.0.1',
|
||||||
'category': 'Useless',
|
'category': 'Coworking',
|
||||||
'author': 'Yaltik',
|
'author': 'Yaltik',
|
||||||
'license': 'AGPL-3',
|
'license': 'AGPL-3',
|
||||||
'application': False,
|
'application': False,
|
||||||
'installable': True,
|
'installable': True,
|
||||||
'data': ['views/coworking_menu.xml', 'views/coworker_views.xml',
|
'data': ['security/ir.model.access.csv',
|
||||||
'security/ir.model.access.csv', 'views/event_menu.xml', 'views/event_views.xml'],
|
'views/coworking_menu.xml',
|
||||||
'depends': ['base']
|
'views/coworker_views.xml'],
|
||||||
|
'depends': ['coworking_base']
|
||||||
}
|
}
|
||||||
|
@ -1,4 +1,2 @@
|
|||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
"""dd"""
|
|
||||||
from . import coworker
|
from . import coworker
|
||||||
from . import event
|
|
||||||
|
@ -42,22 +42,6 @@ class Coworker(models.Model):
|
|||||||
is_done = fields.Boolean('Done?')
|
is_done = fields.Boolean('Done?')
|
||||||
is_active = fields.Boolean('Active?', default=True)
|
is_active = fields.Boolean('Active?', default=True)
|
||||||
|
|
||||||
# Event fields
|
|
||||||
manager_event_ids = fields.One2many('coworking.event', 'manager_id',
|
|
||||||
string='Events managed')
|
|
||||||
event_ids = fields.Many2many('coworking.event', string='Events visited')
|
|
||||||
|
|
||||||
events_coworker_count = fields.Integer('Number of event have participe',
|
|
||||||
compute='_compute_events_coworker_count')
|
|
||||||
|
|
||||||
|
|
||||||
@api.depends('event_ids')
|
|
||||||
def _compute_events_coworker_count(self):
|
|
||||||
""" Computes number of event coworker """
|
|
||||||
for event in self:
|
|
||||||
event.events_coworker_count = len(event.event_ids)
|
|
||||||
|
|
||||||
|
|
||||||
@api.depends('name', 'firstname')
|
@api.depends('name', 'firstname')
|
||||||
def _compute_full_name(self):
|
def _compute_full_name(self):
|
||||||
"""Concaténation du nom et du prénom"""
|
"""Concaténation du nom et du prénom"""
|
||||||
|
@ -1,4 +1,3 @@
|
|||||||
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
|
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
|
||||||
acess_coworker_group_user,Access COWORKER Member User,model_coworking_coworker,base.group_user,1,1,1,0
|
acess_coworker_group_user,Access COWORKER Member User,model_coworking_coworker,base.group_user,1,1,1,0
|
||||||
acess_coworker_group_manager,Access COWORKER Member Manager,model_coworking_coworker,base.group_partner_manager,1,1,1,1
|
acess_coworker_group_manager,Access COWORKER Member Manager,model_coworking_coworker,base.group_partner_manager,1,1,1,1
|
||||||
acess_coworker_group_user,Access COWORKER Member User,model_coworking_event,base.group_user,1,1,1,1
|
|
||||||
|
|
@ -37,14 +37,6 @@
|
|||||||
<page string="Note" name="note">
|
<page string="Note" name="note">
|
||||||
<field name="note" />
|
<field name="note" />
|
||||||
</page>
|
</page>
|
||||||
<page string="Events" name="Events">
|
|
||||||
<group name="events">
|
|
||||||
<field name="manager_event_ids"
|
|
||||||
context="{'default_manager_id': active_id}" />
|
|
||||||
<field name="event_ids" />
|
|
||||||
<field name="events_coworker_count" />
|
|
||||||
</group>
|
|
||||||
</page>
|
|
||||||
</notebook>
|
</notebook>
|
||||||
</groupe>
|
</groupe>
|
||||||
</sheet>
|
</sheet>
|
||||||
|
@ -16,16 +16,18 @@
|
|||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
{
|
{
|
||||||
'name': 'Coworking',
|
'name': 'Coworking event',
|
||||||
'summary': 'yaltik coworking module simplify your coworking gerance',
|
'summary': 'yaltik coworking module simplify your coworking gerance',
|
||||||
'description': """ yaltik coworking module simplify your coworking gerance """,
|
'description': """ yaltik coworking module simplify your coworking gerance """,
|
||||||
'version': '10.0.0.0.1',
|
'version': '10.0.0.0.1',
|
||||||
'category': 'Useless',
|
'category': 'Coworking',
|
||||||
'author': 'Yaltik',
|
'author': 'Yaltik',
|
||||||
'license': 'AGPL-3',
|
'license': 'AGPL-3',
|
||||||
'application': False,
|
'application': False,
|
||||||
'installable': True,
|
'installable': True,
|
||||||
'data': ['views/coworking_menu.xml', 'views/coworker_views.xml',
|
'data': ['security/ir.model.access.csv',
|
||||||
'security/ir.model.access.csv', 'views/event_menu.xml', 'views/event_views.xml'],
|
'views/event_menu.xml',
|
||||||
'depends': ['base']
|
'views/event_views.xml',
|
||||||
|
'views/coworker_views.xml'],
|
||||||
|
'depends': ['coworking_coworker']
|
||||||
}
|
}
|
||||||
|
@ -1,4 +1,3 @@
|
|||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
"""dd"""
|
"""dd"""
|
||||||
from . import coworker
|
from . import event, coworker
|
||||||
from . import event
|
|
||||||
|
22
coworking_event/models/coworker.py
Normal file
22
coworking_event/models/coworker.py
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
|
""" Coworker adaptations """
|
||||||
|
|
||||||
|
from odoo import models, fields, api
|
||||||
|
|
||||||
|
class Coworker(models.Model):
|
||||||
|
""" Coworker adaptations """
|
||||||
|
_inherit = 'coworking.coworker'
|
||||||
|
|
||||||
|
manager_event_ids = fields.One2many('coworking.event', 'manager_id',
|
||||||
|
string='Events managed')
|
||||||
|
event_ids = fields.Many2many('coworking.event', string='Events visited')
|
||||||
|
|
||||||
|
events_coworker_count = fields.Integer('Number of event have participe',
|
||||||
|
compute='_compute_events_coworker_count')
|
||||||
|
|
||||||
|
@api.depends('event_ids')
|
||||||
|
def _compute_events_coworker_count(self):
|
||||||
|
""" Computes number of event coworker """
|
||||||
|
for event in self:
|
||||||
|
event.events_coworker_count = len(event.event_ids)
|
@ -1,4 +1,2 @@
|
|||||||
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
|
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
|
||||||
acess_coworker_group_user,Access COWORKER Member User,model_coworking_coworker,base.group_user,1,1,1,0
|
|
||||||
acess_coworker_group_manager,Access COWORKER Member Manager,model_coworking_coworker,base.group_partner_manager,1,1,1,1
|
|
||||||
acess_coworker_group_user,Access COWORKER Member User,model_coworking_event,base.group_user,1,1,1,1
|
acess_coworker_group_user,Access COWORKER Member User,model_coworking_event,base.group_user,1,1,1,1
|
||||||
|
|
24
coworking_event/views/coworker_views.xml
Normal file
24
coworking_event/views/coworker_views.xml
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
|
||||||
|
<odoo>
|
||||||
|
|
||||||
|
<!-- Form -->
|
||||||
|
<record id="view_form_coworker" model="ir.ui.view">
|
||||||
|
<field name="name">Coworker Form adaptations</field>
|
||||||
|
<field name="model">coworking.coworker</field>
|
||||||
|
<field name="inherit_id" ref ="coworking_coworker.view_form_coworker" />
|
||||||
|
<field name="arch" type="xml">
|
||||||
|
<notebook position="inside">
|
||||||
|
<page string="Events" name="Events">
|
||||||
|
<group name="events">
|
||||||
|
<field name="manager_event_ids"
|
||||||
|
context="{'default_manager_id': active_id}" />
|
||||||
|
<field name="event_ids" />
|
||||||
|
<field name="events_coworker_count" />
|
||||||
|
</group>
|
||||||
|
</page>
|
||||||
|
</notebook>
|
||||||
|
</field>
|
||||||
|
</record>
|
||||||
|
|
||||||
|
</odoo>
|
Loading…
Reference in New Issue
Block a user