Skip to content
Extraits de code Groupes Projets
Valider d782a53a rédigé par Benjamin - Le Filament's avatar Benjamin - Le Filament
Parcourir les fichiers

[cgscop #180] liaison ligne de temps - agenda

parent 03e8089a
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
......@@ -13,6 +13,7 @@
"data": [
"security/security_rules.xml",
"views/calendar.xml",
"views/hr_timesheet.xml",
"wizard/calendar_event_transform.xml",
],
'qweb': [
......
......@@ -2,4 +2,5 @@
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from . import calendar
from . import hr_timesheet
......@@ -49,7 +49,7 @@ class CGScopCalendar(models.Model):
'union.regionale',
string='Union Régionale',
index=True,
on_delete='restrict',
ondelete='restrict',
default=_default_ur)
ur_financial_system_nb = fields.Integer(
string="Nb Dispositifs Financiers",
......@@ -126,6 +126,7 @@ class CGScopCalendar(models.Model):
'company_id': self.env.user.company_id.id,
'unit_amount': event.duration if not event.allday else 8.0,
'partner_id': event.coop_id.id,
'event_id': event.id,
})
@api.multi
......
# © 2019 Le Filament (<http://www.le-filament.com>)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from odoo import models, fields
class ScopHrTimesheetCalendar(models.Model):
_inherit = "account.analytic.line"
event_id = fields.Many2one(
comodel_name='calendar.event',
string="Entrée d'Agenda",
copy=False,
ondelete="set null")
type_event = fields.Selection([
('outside', 'Extérieur'),
('ur', 'UR'),
('absent', 'Absence, Congés, Divers')],
string="Type de Réunion",
related='event_id.type')
<?xml version="1.0"?>
<!-- Copyright 2019 Le Filament
License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). -->
<odoo>
<data noupdate="0">
<!--
Vues
-->
<!-- Tree View Timesheet CG -->
<record id="view_cgscop_hr_timesheet_calendar_line_tree" model="ir.ui.view">
<field name="name">account.analytic.line.calendar.cgscop</field>
<field name="model">account.analytic.line</field>
<field name="inherit_id" ref="cgscop_timesheet.view_cgscop_hr_timesheet_line_tree"/>
<field name="arch" type="xml">
<field name="ur_financial_system_nb" position="after">
<field name="type_event" readonly="1"/>
</field>
</field>
</record>
</data>
</odoo>
\ No newline at end of file
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Veuillez vous inscrire ou vous pour commenter