From 228a315172022519e79f604c95218e0d0f186bbc Mon Sep 17 00:00:00 2001
From: Remi <remi@le-filament.com>
Date: Fri, 19 Apr 2019 14:14:09 +0200
Subject: [PATCH] Update license and fix code according to standards

---
 LICENSE                               |  27 ---
 README.rst                            |   2 +-
 __init__.py                           |   3 +-
 __manifest__.py                       |  39 ++--
 data/mail_subtype.xml                 |  36 +--
 models/__init__.py                    |   3 +-
 models/lefilament_maintenance.py      | 160 ++++++++------
 views/lefilament_maintenance_view.xml | 305 +++++++++++++-------------
 views/schedule.xml                    |   2 +
 9 files changed, 287 insertions(+), 290 deletions(-)

diff --git a/LICENSE b/LICENSE
index 7e5dad2..33aa54e 100644
--- a/LICENSE
+++ b/LICENSE
@@ -201,30 +201,3 @@ IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY C
 If the disclaimer of warranty and limitation of liability provided above cannot be given local legal effect according to their terms, reviewing courts shall apply local law that most closely approximates an absolute waiver of all civil liability in connection with the Program, unless a warranty or assumption of liability accompanies a copy of the Program in return for a fee.
 
 END OF TERMS AND CONDITIONS
-
-How to Apply These Terms to Your New Programs
-
-If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms.
-
-To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively state the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found.
-
-    <one line to give the program's name and a brief idea of what it does.>
-    Copyright (C) <year>  <name of author>
-
-    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 <https://www.gnu.org/licenses/>.
-Also add information on how to contact you by electronic and paper mail.
-
-If your software can interact with users remotely through a computer network, you should also make sure that it provides a way for users to get its source. For example, if your program is a web application, its interface could display a "Source" link that leads users to an archive of the code. There are many ways you could offer source, and different solutions will be better for different programs; see section 13 for the specific requirements.
-
-You should also get your employer (if you work as a programmer) or school, if any, to sign a "copyright disclaimer" for the program, if necessary. For more information on this, and how to apply and follow the GNU AGPL, see <https://www.gnu.org/licenses/>.
\ No newline at end of file
diff --git a/README.rst b/README.rst
index 14433d5..324c10c 100644
--- a/README.rst
+++ b/README.rst
@@ -22,7 +22,7 @@ Contributors ------------
 
 Maintainer ----------
 
-.. image:: https://le-filament.com/images/logo-lefilament.png
+.. image:: https://le-filament.com/img/logo-lefilament.png
    :alt: Le Filament
    :target: https://le-filament.com
 
diff --git a/__init__.py b/__init__.py
index a5e7e1d..a77a6fc 100644
--- a/__init__.py
+++ b/__init__.py
@@ -1,3 +1,4 @@
 # -*- coding: utf-8 -*-
+# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
 
-import models
\ No newline at end of file
+from . import models
diff --git a/__manifest__.py b/__manifest__.py
index 44cbcb8..143913c 100644
--- a/__manifest__.py
+++ b/__manifest__.py
@@ -1,29 +1,28 @@
 # -*- coding: utf-8 -*-
 
 {
-	'name': 'Le Filament - Maintenance',
-	'version': '10.0.1.0',
-	'summary': 'Gestion des contrats de maintenance',
-	'license': 'AGPL-3',
-	'description': """
-	MODULE DE GESTION DE CONTRATS DE MAINTENANCE
-	
-	Ajoute un menu au module Projet :
+    'name': 'Le Filament - Maintenance',
+    'version': '10.0.1.0.0',
+    'summary': 'Gestion des contrats de maintenance',
+    'license': 'AGPL-3',
+    'description': """
+    MODULE DE GESTION DE CONTRATS DE MAINTENANCE
+    Ajoute un menu au module Projet :
    - List View des contrats
    - Filtres sur contrats en cours
    - FormView des contrats
-	""",
-	'author': 'LE FILAMENT',
-	'category': 'LE FILAMENT',
-	'depends': ['base','project'],
-	'contributors': [
+    """,
+    'author': 'LE FILAMENT',
+    'category': 'LE FILAMENT',
+    'depends': ['base', 'project'],
+    'contributors': [
         'Benjamin Rivier <benjamin@le-filament.com>',
     ],
-	'website': 'http://www.le-filament.com',
-	'data': [
-		'views/lefilament_maintenance_view.xml',
-		'views/schedule.xml',
-		'security/ir.model.access.csv',
-		'data/mail_subtype.xml',
-	],
+    'website': 'http://www.le-filament.com',
+    'data': [
+        'views/lefilament_maintenance_view.xml',
+        'views/schedule.xml',
+        'security/ir.model.access.csv',
+        'data/mail_subtype.xml',
+    ],
 }
diff --git a/data/mail_subtype.xml b/data/mail_subtype.xml
index 36b1e45..835fc93 100644
--- a/data/mail_subtype.xml
+++ b/data/mail_subtype.xml
@@ -1,21 +1,23 @@
 <?xml version="1.0" encoding="UTF-8"?>
+<!-- Copyright 2019 Le Filament (<https://www.le-filament.com>)
+     License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). -->
 
-<odoo noupdate="1">
-
-    <record id="mail_message_subtype_maintenance" model="mail.message.subtype">
-        <field name="name">Maintenance Le Filament</field>
-        <field name="description">Action Réalisée</field>
-        <field name="res_model">project.maintenance</field>
-        <field name="default" eval="True" />
-        <field name="internal" eval="True" />
-    </record>
-
-    <record id="mail_message_subtype_maintenance_check" model="mail.message.subtype">
-        <field name="name">Retard Maintenance</field>
-        <field name="description">Action en retard</field>
-        <field name="res_model">project.maintenance</field>
-        <field name="default" eval="True" />
-        <field name="internal" eval="True" />
-    </record>
+<odoo>
+    <data noupdate="1">
+        <record id="mail_message_subtype_maintenance" model="mail.message.subtype">
+            <field name="name">Maintenance Le Filament</field>
+            <field name="description">Action Réalisée</field>
+            <field name="res_model">project.maintenance</field>
+            <field name="default" eval="True" />
+            <field name="internal" eval="True" />
+        </record>
 
+        <record id="mail_message_subtype_maintenance_check" model="mail.message.subtype">
+            <field name="name">Retard Maintenance</field>
+            <field name="description">Action en retard</field>
+            <field name="res_model">project.maintenance</field>
+            <field name="default" eval="True" />
+            <field name="internal" eval="True" />
+        </record>
+    </data>
 </odoo>
\ No newline at end of file
diff --git a/models/__init__.py b/models/__init__.py
index d6de03b..3a2392e 100644
--- a/models/__init__.py
+++ b/models/__init__.py
@@ -1,3 +1,4 @@
 # -*- coding: utf-8 -*-
+# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
 
-import lefilament_maintenance
\ No newline at end of file
+from . import lefilament_maintenance
diff --git a/models/lefilament_maintenance.py b/models/lefilament_maintenance.py
index 13a1362..b4b4bf6 100644
--- a/models/lefilament_maintenance.py
+++ b/models/lefilament_maintenance.py
@@ -1,77 +1,95 @@
 # -*- coding: utf-8 -*-
 
-# © 2017 Le Filament (<http://www.le-filament.com>)
+# © 2017 Le Filament (<https://www.le-filament.com>)
 # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
 
-from datetime import datetime, date, timedelta
-from odoo import tools
-from odoo import models, fields, api, osv
-from odoo.exceptions import UserError, RedirectWarning, ValidationError
-
-class LeFilamentMaintenance(models.Model):
-	_name = 'project.maintenance'
-	_description = 'Suivi des programmes de maintenance'
-	_inherit = 'mail.message.subtype','mail.thread'
-
-	name = fields.Char('Description', required=True,)
-
-	lf_m_user_id = fields.Many2one('res.users', string='Responsable Contrat',)
-
-	lf_m_partner_id = fields.Many2one('res.partner', string='Client',)
-	lf_m_project_id = fields.Many2one('project.project', string='Projet',)
-
-	lf_m_date_debut = fields.Date('Date de début')
-	lf_m_date_fin = fields.Date('Date de Fin')
-	lf_m_montant = fields.Float('Montant')
-
-	lf_m_termine = fields.Boolean('Terminé')
-	lf_m_renouvelle = fields.Boolean('À renouveller')
-
-	
-	lf_m_task = fields.Char('Action')
-	lf_m_cycle = fields.Integer('Récurrence (jours)', default=0,)
-	lf_m_date_task = fields.Datetime('Prochaine échéance')
-	lf_m_comment = fields.Char('Commentaire')
-
-	lf_m_note = fields.Text('Notes')
-
-	subtype_id = fields.Many2one('mail.message.subtype', string='Message Subtype', required=True, ondelete='cascade')
-
-	@api.one
-	def action_ok(self):
-		if self.lf_m_cycle != 0 and self.lf_m_date_task:	
-			next_date = datetime.strptime(self.lf_m_date_task, '%Y-%m-%d %H:%M:%S') + timedelta(days=self.lf_m_cycle)
-			body = '<li>Prochaine action le '+next_date.strftime('%d/%m/%Y')+'</li>'
-			if self.lf_m_task:
-				body += '<li>Action : '+self.lf_m_task+'</li>'
-			if self.lf_m_comment:
-				body += '<li>Commentaire : '+self.lf_m_comment+'</li>'
-			body_html = "<div><b>%(title)s</b> : %(action)s</div></ul>%(body)s</ul>" % {
-				'title': self.name,
-				'action': 'Action OK',
-				'body': body,
-				'comment': self.lf_m_comment or '',
-			}
-			self.message_post(body_html, subject='Activité OK', subtype_id=self.env.ref("lefilament_maintenance.mail_message_subtype_maintenance").id )
-			self.lf_m_date_task = next_date
-			self.lf_m_comment = ""
-		else:
-			raise UserError("La date de prochaine échéance et la récurrence doivent être renseignées")
-
-	@api.multi
-	def action_check(self):
-		projets = self.env['project.maintenance'].search([])
-		for record in projets:
-			if record.lf_m_date_task :
-				action_date = datetime.strptime(record.lf_m_date_task, '%Y-%m-%d %H:%M:%S')
-				if datetime.now() > action_date :
-					act_date = action_date.strftime('%d/%m/%Y').encode('utf-8')
-					body_html = '<div style="color:#fc8675;"><b>%(title)s</b></div>Projet : <b>%(projet)s</b><br />Action à effectuer le <span style="color:#fc8675;font-weight: 700;">%(next)s</span><br />' % {
-						'title': 'Retard Maintenance',
-						'projet': record.name.encode('utf-8'),
-						'next' : act_date
-					}
-					record.message_post(body_html, subject='Retard Maintenance', subtype_id=self.env.ref("lefilament_maintenance.mail_message_subtype_maintenance_check").id )
-
+from datetime import datetime, timedelta
+from odoo import models, fields, api
+from odoo.exceptions import UserError
 
 
+class LeFilamentMaintenance(models.Model):
+    _name = 'project.maintenance'
+    _description = 'Suivi des programmes de maintenance'
+    _inherit = 'mail.message.subtype', 'mail.thread'
+
+    name = fields.Char('Description', required=True,)
+
+    lf_m_user_id = fields.Many2one('res.users', string='Responsable Contrat',)
+
+    lf_m_partner_id = fields.Many2one('res.partner', string='Client',)
+    lf_m_project_id = fields.Many2one('project.project', string='Projet',)
+
+    lf_m_date_debut = fields.Date('Date de début')
+    lf_m_date_fin = fields.Date('Date de Fin')
+    lf_m_montant = fields.Float('Montant')
+
+    lf_m_termine = fields.Boolean('Terminé')
+    lf_m_renouvelle = fields.Boolean('À renouveller')
+
+    lf_m_task = fields.Char('Action')
+    lf_m_cycle = fields.Integer('Récurrence (jours)', default=0,)
+    lf_m_date_task = fields.Datetime('Prochaine échéance')
+    lf_m_comment = fields.Char('Commentaire')
+
+    lf_m_note = fields.Text('Notes')
+
+    subtype_id = fields.Many2one('mail.message.subtype',
+                                 string='Message Subtype',
+                                 required=True,
+                                 ondelete='cascade')
+
+    @api.one
+    def action_ok(self):
+        if self.lf_m_cycle != 0 and self.lf_m_date_task:
+            next_date = datetime.strptime(
+                self.lf_m_date_task, '%Y-%m-%d %H:%M:%S') + timedelta(
+                    days=self.lf_m_cycle)
+            body = '<li>Prochaine action le ' \
+                + next_date.strftime('%d/%m/%Y')+'</li>'
+            if self.lf_m_task:
+                body += '<li>Action : '+self.lf_m_task+'</li>'
+            if self.lf_m_comment:
+                body += '<li>Commentaire : '+self.lf_m_comment+'</li>'
+            body_html = "<div><b>%(title)s</b> : %(action)s</div>\
+                </ul>%(body)s</ul>" % {
+                    'title': self.name,
+                    'action': 'Action OK',
+                    'body': body,
+                    'comment': self.lf_m_comment or '',
+                    }
+            self.message_post(body_html,
+                              subject='Activité OK',
+                              subtype_id=self.env.ref(
+                                  "lefilament_maintenance.\
+                                      mail_message_subtype_maintenance").id)
+            self.lf_m_date_task = next_date
+            self.lf_m_comment = ""
+        else:
+            raise UserError("La date de prochaine échéance et la récurrence \
+                            doivent être renseignés")
+
+    @api.multi
+    def action_check(self):
+        projets = self.env['project.maintenance'].search([])
+        for record in projets:
+            if record.lf_m_date_task:
+                action_date = datetime.strptime(record.lf_m_date_task,
+                                                '%Y-%m-%d %H:%M:%S')
+                if datetime.now() > action_date:
+                    act_date = action_date.strftime('%d/%m/%Y').encode('utf-8')
+                    body_html = '<div style="color:#fc8675;">\
+                        <b>%(title)s</b></div>Projet : <b>%(projet)s</b>\
+                        <br />Action à effectuer le \
+                        <span style="color:#fc8675;font-weight: 700;">\
+                        %(next)s</span><br />' % {
+                            'title': 'Retard Maintenance',
+                            'projet': record.name.encode('utf-8'),
+                            'next': act_date
+                            }
+                    record.message_post(
+                        body_html,
+                        subject='Retard Maintenance',
+                        subtype_id=self.env.ref(
+                            "lefilament_maintenance.\
+                                mail_message_subtype_maintenance_check").id)
diff --git a/views/lefilament_maintenance_view.xml b/views/lefilament_maintenance_view.xml
index 03fad89..acd3031 100644
--- a/views/lefilament_maintenance_view.xml
+++ b/views/lefilament_maintenance_view.xml
@@ -1,166 +1,167 @@
 <?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright 2019 Le Filament (<https://www.le-filament.com>)
+     License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). -->
 
 <odoo>
-	<data>
-	
-		<!-- Project Form -->
-		<record id="lefilament_maintenance_form" model="ir.ui.view">
-			<field name="name">Le Filament Maintenance Form</field>
-			<field name="model">project.maintenance</field>
-			<field name="arch" type="xml">
-			<form string="Contrat">
-				<sheet>
-					<div class="col-xs-12">
-						<h2>Description</h2>
-						<field name="name" />
-					</div>
-					<div class="col-xs-12 col-sm-6">
-						<group string="Le Projet">
-							<field name="lf_m_date_debut" widget="date"  />
-							<field name="lf_m_date_fin" widget="date"  />
-							<field name="lf_m_montant" />
-							<field name="lf_m_termine" />
-							<field name="lf_m_renouvelle" />
-						</group>
-					</div>
-					<div class="col-xs-12 col-sm-6">
-						<group string="Le Client">
-							<field name="lf_m_user_id"/>
-							<field name="lf_m_project_id" widget="Many2one" />							
-							<field name="lf_m_partner_id" widget="Many2one" />
-						</group>
-					</div>
-					<div class="col-xs-12">
-						<group string="L'Action">
-							<group>
-								<field name="lf_m_task"/>
-							</group>
-							<group>
-								<field name="lf_m_cycle" />
-							</group>						
-						</group>
-					</div>
-					<div class="col-xs-12">
-						<group string="Prochaine Action">
-							<group>
-								<field name="lf_m_comment" />
-							</group>
-							<group>
-								<field name="lf_m_date_task" />
-							</group>
-						</group>
-						<button string="Action OK" type="object" name="action_ok" class="oe_highlight"/>
-					</div>
-					<div class="col-xs-12">
-						<notebook>
-                        	<page string="Notes">
-								<field name="lf_m_note" />
-							</page>
-						</notebook>
-					</div>
-					<div class="clearfix"></div>
-				</sheet>
-				<div class="oe_chatter">
-					<field name="message_follower_ids" widget="mail_followers" />
-					<field name="message_ids" widget="mail_thread" />
-				</div> 
-			</form>	
-		</field>
-		</record>
+    <data>
+        <!-- Project Form -->
+        <record id="lefilament_maintenance_form" model="ir.ui.view">
+            <field name="name">Le Filament Maintenance Form</field>
+            <field name="model">project.maintenance</field>
+            <field name="arch" type="xml">
+            <form string="Contrat">
+                <sheet>
+                    <div class="col-xs-12">
+                        <h2>Description</h2>
+                        <field name="name" />
+                    </div>
+                    <div class="col-xs-12 col-sm-6">
+                        <group string="Le Projet">
+                            <field name="lf_m_date_debut" widget="date"  />
+                            <field name="lf_m_date_fin" widget="date"  />
+                            <field name="lf_m_montant" />
+                            <field name="lf_m_termine" />
+                            <field name="lf_m_renouvelle" />
+                        </group>
+                    </div>
+                    <div class="col-xs-12 col-sm-6">
+                        <group string="Le Client">
+                            <field name="lf_m_user_id"/>
+                            <field name="lf_m_project_id" widget="Many2one" />                          
+                            <field name="lf_m_partner_id" widget="Many2one" />
+                        </group>
+                    </div>
+                    <div class="col-xs-12">
+                        <group string="L'Action">
+                            <group>
+                                <field name="lf_m_task"/>
+                            </group>
+                            <group>
+                                <field name="lf_m_cycle" />
+                            </group>                        
+                        </group>
+                    </div>
+                    <div class="col-xs-12">
+                        <group string="Prochaine Action">
+                            <group>
+                                <field name="lf_m_comment" />
+                            </group>
+                            <group>
+                                <field name="lf_m_date_task" />
+                            </group>
+                        </group>
+                        <button string="Action OK" type="object" name="action_ok" class="oe_highlight"/>
+                    </div>
+                    <div class="col-xs-12">
+                        <notebook>
+                            <page string="Notes">
+                                <field name="lf_m_note" />
+                            </page>
+                        </notebook>
+                    </div>
+                    <div class="clearfix"></div>
+                </sheet>
+                <div class="oe_chatter">
+                    <field name="message_follower_ids" widget="mail_followers" />
+                    <field name="message_ids" widget="mail_thread" />
+                </div> 
+            </form> 
+        </field>
+        </record>
 
 
-		<!-- Tree View Projects -->
-		<record id="lefilament_maintenance_tree" model="ir.ui.view">
-			<field name="name">Le Filament Maintenance Tree</field>
-			<field name="model">project.maintenance</field>
-			<field name="arch" type="xml">
-			<tree string="Liste des Contrats" decoration-danger="lf_m_termine != True" >
-				<field name="name" />
-				<field name="lf_m_project_id" />
-				<field name="lf_m_partner_id" />
-				<field name="lf_m_date_debut" widget="date"  />
-				<field name="lf_m_date_fin" widget="date" />
-				<field name="lf_m_termine" />
-				<field name="lf_m_renouvelle" />
-				<field name="lf_m_user_id"/>
-				<field name="lf_m_montant" />
-			</tree>	
-		</field>
-		</record>
+        <!-- Tree View Projects -->
+        <record id="lefilament_maintenance_tree" model="ir.ui.view">
+            <field name="name">Le Filament Maintenance Tree</field>
+            <field name="model">project.maintenance</field>
+            <field name="arch" type="xml">
+            <tree string="Liste des Contrats" decoration-danger="lf_m_termine != True" >
+                <field name="name" />
+                <field name="lf_m_project_id" />
+                <field name="lf_m_partner_id" />
+                <field name="lf_m_date_debut" widget="date"  />
+                <field name="lf_m_date_fin" widget="date" />
+                <field name="lf_m_termine" />
+                <field name="lf_m_renouvelle" />
+                <field name="lf_m_user_id"/>
+                <field name="lf_m_montant" />
+            </tree> 
+        </field>
+        </record>
 
-		<!-- Filtres et Champ de Recherche -->
-		<record id="lefilament_maintenance_filter" model="ir.ui.view">
-			  <field name="name">Le Filament Maintenance Filter</field>
-			  <field name="model">project.maintenance</field>
-			  <field name="arch" type="xml">
-				    <search>
-						<!-- Champs de recherche -->
-				     	<field name="name"/>
-				     	<field name="lf_m_partner_id"/>
-				     	<field name="lf_m_project_id"/>
-				     	<separator></separator>
-				     	<field name="lf_m_date_fin"/>
-				     	<field name="lf_m_termine"/>
-						
-						<!-- Filtres -->
-				    	<filter string="En cours" domain="[('lf_m_termine','!=',True)]"/>
-				    	<filter string="À renouveller" domain="[('lf_m_renouvelle','=',True)]"/>
+        <!-- Filtres et Champ de Recherche -->
+        <record id="lefilament_maintenance_filter" model="ir.ui.view">
+              <field name="name">Le Filament Maintenance Filter</field>
+              <field name="model">project.maintenance</field>
+              <field name="arch" type="xml">
+                    <search>
+                        <!-- Champs de recherche -->
+                        <field name="name"/>
+                        <field name="lf_m_partner_id"/>
+                        <field name="lf_m_project_id"/>
+                        <separator></separator>
+                        <field name="lf_m_date_fin"/>
+                        <field name="lf_m_termine"/>
+                        
+                        <!-- Filtres -->
+                        <filter string="En cours" domain="[('lf_m_termine','!=',True)]"/>
+                        <filter string="À renouveller" domain="[('lf_m_renouvelle','=',True)]"/>
 
-				    	<!-- Groupes -->
-				    	<group expand="0" name="group_by" string="Group By">
-	                       <filter string="Client" domain="[]" context="{'group_by' : 'lf_m_partner_id'}" />
-	                       <filter string="Projet" domain="[]" context="{'group_by' : 'lf_m_project_id'}" />
-	                       <filter string="Responsable" domain="[]" context="{'group_by' : 'lf_m_user_id'}" />
-	                       <separator></separator>
-	                       <filter string="Date" domain="[]" context="{'group_by' : 'lf_m_date_fin'}" />
-	                   </group>
+                        <!-- Groupes -->
+                        <group expand="0" name="group_by" string="Group By">
+                           <filter string="Client" domain="[]" context="{'group_by' : 'lf_m_partner_id'}" />
+                           <filter string="Projet" domain="[]" context="{'group_by' : 'lf_m_project_id'}" />
+                           <filter string="Responsable" domain="[]" context="{'group_by' : 'lf_m_user_id'}" />
+                           <separator></separator>
+                           <filter string="Date" domain="[]" context="{'group_by' : 'lf_m_date_fin'}" />
+                       </group>
 
-				    </search>
-			  </field>
-		</record>
+                    </search>
+              </field>
+        </record>
 
-		<!-- GRAPH + PIVOT -->
-		<record id="lefilament_maintenance_graph" model="ir.ui.view">
-			<field name="name">Le Filament Maintenance Graph</field>
-			<field name="model">project.maintenance</field>
-			<field name="arch" type="xml">
-				<graph type="graph">
-					<field name="lf_m_partner_id" type="row" />
-					<field name="lf_m_project_id" type="row" />
-					<field name="lf_m_date_fin" interval="month" type="col" />
-					<field name="lf_m_montant" type="measure" />
-				</graph>
-			</field>
-		</record>
+        <!-- GRAPH + PIVOT -->
+        <record id="lefilament_maintenance_graph" model="ir.ui.view">
+            <field name="name">Le Filament Maintenance Graph</field>
+            <field name="model">project.maintenance</field>
+            <field name="arch" type="xml">
+                <graph type="graph">
+                    <field name="lf_m_partner_id" type="row" />
+                    <field name="lf_m_project_id" type="row" />
+                    <field name="lf_m_date_fin" interval="month" type="col" />
+                    <field name="lf_m_montant" type="measure" />
+                </graph>
+            </field>
+        </record>
 
-		<record id="lefilament_maintenance_pivot" model="ir.ui.view">
-			<field name="name">Le Filament Maintenance Pivot</field>
-			<field name="model">project.maintenance</field>
-			<field name="arch" type="xml">
-				<pivot type="pivot">
-					<field name="lf_m_project_id" />
-					<field name="lf_m_date_fin" interval="month" type="col" />
-					<field name="lf_m_montant" type="measure" />
-				</pivot>
-			</field>
-		</record>
+        <record id="lefilament_maintenance_pivot" model="ir.ui.view">
+            <field name="name">Le Filament Maintenance Pivot</field>
+            <field name="model">project.maintenance</field>
+            <field name="arch" type="xml">
+                <pivot type="pivot">
+                    <field name="lf_m_project_id" />
+                    <field name="lf_m_date_fin" interval="month" type="col" />
+                    <field name="lf_m_montant" type="measure" />
+                </pivot>
+            </field>
+        </record>
 
-		<record id="nichoir_report_action" model="ir.actions.act_window">
-	             <field name="name">Le Filament Maintenance Graph</field>
-	             <field name="res_model">project.maintenance</field>
-	             <field name="view_type">form</field>
-	             <field name="view_mode">pivot,graph</field>
-	             <field name="domain">[]</field>
-	             <field name="view_ids" 
-	                   eval="[(5, 0, 0),
-	                          (0, 0, {'view_mode': 'pivot', 'view_id': ref('lefilament_maintenance_pivot')}),
-	                          (0, 0, {'view_mode': 'graph', 'view_id': ref('lefilament_maintenance_graph')})]"/>
-	    </record>
+        <record id="nichoir_report_action" model="ir.actions.act_window">
+                 <field name="name">Le Filament Maintenance Graph</field>
+                 <field name="res_model">project.maintenance</field>
+                 <field name="view_type">form</field>
+                 <field name="view_mode">pivot,graph</field>
+                 <field name="domain">[]</field>
+                 <field name="view_ids" 
+                       eval="[(5, 0, 0),
+                              (0, 0, {'view_mode': 'pivot', 'view_id': ref('lefilament_maintenance_pivot')}),
+                              (0, 0, {'view_mode': 'graph', 'view_id': ref('lefilament_maintenance_graph')})]"/>
+        </record>
 
-		<act_window id="action_lefilament_maintenance" name="Contrats de Maintenance" res_model="project.maintenance" view_mode="tree,form,pivot,graph" />
-		<!-- Menu Maintenance --> 
-		<menuitem id="menu_lefilament_maintenance" name="Maintenance" sequence="2" parent="project.menu_main_pm" />
-	    	<menuitem id="menu_lefilament_maintenance_contrat" name="Contrats" sequence="1" parent="menu_lefilament_maintenance" action="action_lefilament_maintenance" />
+        <act_window id="action_lefilament_maintenance" name="Contrats de Maintenance" res_model="project.maintenance" view_mode="tree,form,pivot,graph" />
+        <!-- Menu Maintenance --> 
+        <menuitem id="menu_lefilament_maintenance" name="Maintenance" sequence="2" parent="project.menu_main_pm" />
+            <menuitem id="menu_lefilament_maintenance_contrat" name="Contrats" sequence="1" parent="menu_lefilament_maintenance" action="action_lefilament_maintenance" />
 
-	</data>
+    </data>
 </odoo>
diff --git a/views/schedule.xml b/views/schedule.xml
index 96bf0d8..283b32a 100644
--- a/views/schedule.xml
+++ b/views/schedule.xml
@@ -1,4 +1,6 @@
 <odoo>
+<!-- Copyright 2019 Le Filament (<https://www.le-filament.com>)
+     License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). -->
     <data noupdate="1">
         <record id="ir_cron_maintenance" model="ir.cron">
             <field name="name">Maintenance - Le Filament</field>
-- 
GitLab