forked from michel/Coworking
first commit
This commit is contained in:
commit
c64f00579e
1
__init__.py
Normal file
1
__init__.py
Normal file
@ -0,0 +1 @@
|
|||||||
|
from . import ycoworking_model
|
33
__manifest__.py
Normal file
33
__manifest__.py
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
|
# Copyright 2017 Firstname Lastname <firstname.lastname@company.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/>.
|
||||||
|
|
||||||
|
{
|
||||||
|
'name': 'yaltik_coworking',
|
||||||
|
'summary': 'yaltik coworking module simplify your coworking gerance',
|
||||||
|
'description': """ yaltik coworking module simplify your coworking gerance """,
|
||||||
|
'version': '0.0.0.0.1',
|
||||||
|
'category': 'Useless',
|
||||||
|
'author': 'Yaltik',
|
||||||
|
'license': 'AGPL-3',
|
||||||
|
'application': False,
|
||||||
|
'installable': True,
|
||||||
|
'data': ['views/yaltikcoworking_menu.xml',
|
||||||
|
'views/yaltikcoworking_view.xml',
|
||||||
|
],
|
||||||
|
|
||||||
|
'depends': ['base']
|
||||||
|
}
|
12
views/yaltikcoworking_menu.xml
Normal file
12
views/yaltikcoworking_menu.xml
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
<?xml version="1.0"?>
|
||||||
|
<odoo>
|
||||||
|
<!-- Action to open Coworkers list -->
|
||||||
|
<act_window id="action_coworker"
|
||||||
|
name="Yaltikcoworking"
|
||||||
|
res_model="coworker"
|
||||||
|
view_mode="tree,form" />
|
||||||
|
<!-- Menu item to open Coworkers list -->
|
||||||
|
<menuitem id="menu_yaltikcoworking"
|
||||||
|
name="Coworkers"
|
||||||
|
action="action_coworker" />
|
||||||
|
</odoo>
|
38
views/yaltikcoworking_view.xml
Normal file
38
views/yaltikcoworking_view.xml
Normal file
@ -0,0 +1,38 @@
|
|||||||
|
<?xml version="1.0"?>
|
||||||
|
<odoo>
|
||||||
|
<record id="view_form_coworker" model="ir.ui.view">
|
||||||
|
<field name="name">coworker Form</field>
|
||||||
|
<field name="model">coworker</field>
|
||||||
|
<field name="arch" type="xml">
|
||||||
|
<form string="Coworker">
|
||||||
|
<sheet>
|
||||||
|
<group name="group_top">
|
||||||
|
<group name="group_left">
|
||||||
|
<field name="create_date" readonly="1"/>
|
||||||
|
<field name="name"/>
|
||||||
|
<field name="firstname"/>
|
||||||
|
<field name="coworkertype"/>
|
||||||
|
<field name="companyname" attrs="{'required': [('job', '=', True)]}" />
|
||||||
|
|
||||||
|
|
||||||
|
<field name="job" attrs="{'required': [('companyname', '=', True)]}"/>
|
||||||
|
|
||||||
|
</group>
|
||||||
|
<group name="group_right">
|
||||||
|
<field name="street"/>
|
||||||
|
<field name="postalcode"/>
|
||||||
|
<field name="city"/>
|
||||||
|
<field name="gsm"/>
|
||||||
|
<field name="phonenumber"/>
|
||||||
|
<field name="email"/>
|
||||||
|
<field name="url"/>
|
||||||
|
</group>
|
||||||
|
<field name="note"/>
|
||||||
|
<field name="is_done"/>
|
||||||
|
<field name="active" readonly="1"/>
|
||||||
|
</group>
|
||||||
|
</sheet>
|
||||||
|
</form>
|
||||||
|
</field>
|
||||||
|
</record>
|
||||||
|
</odoo>
|
24
ycoworking_model.py
Normal file
24
ycoworking_model.py
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
from odoo import models, fields
|
||||||
|
class coworker (models.Model):
|
||||||
|
_name = 'coworker'
|
||||||
|
_description = 'Gestion des utilisateurs de l espace'
|
||||||
|
name = fields.Char('Name', required=True)
|
||||||
|
firstname = fields.Char('First name', required=True)
|
||||||
|
|
||||||
|
coworkertype = fields.Selection([('staffer', 'Staffer'), ('worker', 'Worker'), ('member', 'Member'), ('volunteer', 'Volunteer'), ('visitor', 'Visitor')])
|
||||||
|
|
||||||
|
companyname = fields.Char('Company', required=False)
|
||||||
|
job = fields.Char('Job', required=False)
|
||||||
|
street = fields.Char('Street', required=False)
|
||||||
|
postalcode = fields.Char('Postal code', required=False)
|
||||||
|
city = fields.Char('Ville', required=False)
|
||||||
|
phonenumber = fields.Char('Phone number', required=False)
|
||||||
|
gsm = fields.Char('GSM', required=False)
|
||||||
|
email = fields.Char('Email', required=False)
|
||||||
|
url = fields.Char('URL', required=False)
|
||||||
|
create_date = fields.Char('Date of creation', required=False)
|
||||||
|
note = fields.Text('Note', required=False)
|
||||||
|
|
||||||
|
is_done = fields.Boolean('Done?')
|
||||||
|
active = fields.Boolean('Active?', default=True)
|
Loading…
Reference in New Issue
Block a user