forked from michel/Coworking
Merge branch 'master' of fabien/michel_coworking into master
This commit is contained in:
commit
2007ec7438
@ -1 +1,3 @@
|
||||
from . import ycoworking_model
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
from . import models
|
||||
|
@ -16,18 +16,15 @@
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
{
|
||||
'name': 'yaltik_coworking',
|
||||
'name': 'Coworking',
|
||||
'summary': 'yaltik coworking module simplify your coworking gerance',
|
||||
'description': """ yaltik coworking module simplify your coworking gerance """,
|
||||
'version': '0.0.0.0.1',
|
||||
'version': '10.0.0.0.1',
|
||||
'category': 'Useless',
|
||||
'author': 'Yaltik',
|
||||
'license': 'AGPL-3',
|
||||
'application': False,
|
||||
'installable': True,
|
||||
'data': ['views/yaltikcoworking_menu.xml',
|
||||
'views/yaltikcoworking_view.xml',
|
||||
],
|
||||
|
||||
'data': ['views/coworking_menu.xml', 'views/coworker_views.xml'],
|
||||
'depends': ['base']
|
||||
}
|
||||
|
3
models/__init__.py
Normal file
3
models/__init__.py
Normal file
@ -0,0 +1,3 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
from . import coworker
|
31
models/coworker.py
Normal file
31
models/coworker.py
Normal file
@ -0,0 +1,31 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
""" Coworker module """
|
||||
|
||||
from odoo import models, fields
|
||||
|
||||
class Coworker(models.Model):
|
||||
""" Coworker model """
|
||||
_name = 'coworking.coworker'
|
||||
_description = 'Coworker model definition'
|
||||
|
||||
name = fields.Char(required=True)
|
||||
firstname = fields.Char('First name', required=True)
|
||||
coworker_type = fields.Selection([('staffer', 'Staffer'),
|
||||
('worker', 'Worker'), ('member', 'Member'),
|
||||
('volunteer', 'Volunteer'),
|
||||
('visitor', 'Visitor')])
|
||||
company_name = fields.Char('Company')
|
||||
job = fields.Char()
|
||||
|
||||
street = fields.Char()
|
||||
postal_code = fields.Char()
|
||||
city = fields.Char()
|
||||
phone_number = fields.Char()
|
||||
gsm = fields.Char('GSM')
|
||||
email = fields.Char()
|
||||
url = fields.Char('URL')
|
||||
note = fields.Text()
|
||||
|
||||
is_done = fields.Boolean('Done?')
|
||||
is_active = fields.Boolean('Active?', default=True)
|
39
views/coworker_views.xml
Normal file
39
views/coworker_views.xml
Normal file
@ -0,0 +1,39 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
|
||||
<odoo>
|
||||
|
||||
<record id="view_form_coworker" model="ir.ui.view">
|
||||
<field name="name">Coworker Form</field>
|
||||
<field name="model">coworking.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="coworker_type" />
|
||||
<field name="company_name" />
|
||||
<field name="job"
|
||||
attrs="{'invisible': [('company_name', '=', False)], 'required': [('company_name', '!=', False)]}" />
|
||||
</group>
|
||||
<group name="group_right">
|
||||
<field name="street" />
|
||||
<field name="postal_code" />
|
||||
<field name="city" />
|
||||
<field name="gsm" />
|
||||
<field name="phone_number" />
|
||||
<field name="email" />
|
||||
<field name="url" />
|
||||
</group>
|
||||
<field name="note" />
|
||||
<field name="is_done" />
|
||||
<field name="is_active" readonly="1" />
|
||||
</group>
|
||||
</sheet>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
</odoo>
|
11
views/coworking_menu.xml
Normal file
11
views/coworking_menu.xml
Normal file
@ -0,0 +1,11 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
|
||||
<odoo>
|
||||
|
||||
<!-- Action to open Coworkers list -->
|
||||
<act_window id="coworker_action" name="Coworkers"
|
||||
res_model="coworking.coworker" view_mode="tree,form" />
|
||||
<!-- Menu item to open Coworkers list -->
|
||||
<menuitem id="coworker_menu" name="Coworkers" action="coworker_action" />
|
||||
|
||||
</odoo>
|
@ -1,12 +0,0 @@
|
||||
<?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>
|
@ -1,35 +0,0 @@
|
||||
<?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"/>
|
||||
<field name="job" attrs="{'invisible': [('companyname', '=', False)], '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>
|
@ -1,24 +0,0 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
from odoo import models, fields
|
||||
class coworker (models.Model):
|
||||
_name = 'coworker'
|
||||
_description = 'Manage the coworkers'
|
||||
|
||||
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