From a0cd1ca46220a18cf5e888ed2e3c91b0c3df35c2 Mon Sep 17 00:00:00 2001 From: Remi <remi@le-filament.com> Date: Fri, 26 Apr 2019 15:47:52 +0200 Subject: [PATCH] Fix licenses --- LICENSE | 27 --------------------- __init__.py | 3 ++- __manifest__.py | 1 + data/ir_module_category.xml | 2 ++ models/__init__.py | 4 +++- models/lefilament_tdb.py | 28 +++++++++------------- models/res_company.py | 3 +-- security/lefilament_dashboard_security.xml | 2 ++ static/src/xml/lefilament_tdb.xml | 4 +++- static/src/xml/lefilament_treso.xml | 4 +++- views/assets.xml | 2 ++ views/schedule.xml | 3 +++ views/views.xml | 2 ++ 13 files changed, 35 insertions(+), 50 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/__init__.py b/__init__.py index 899bcc9..31660d6 100644 --- a/__init__.py +++ b/__init__.py @@ -1,2 +1,3 @@ -from . import models +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). +from . import models diff --git a/__manifest__.py b/__manifest__.py index 566f296..119b63f 100644 --- a/__manifest__.py +++ b/__manifest__.py @@ -1,3 +1,4 @@ +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). { 'name': "Le Filament - Tableau de Bord", diff --git a/data/ir_module_category.xml b/data/ir_module_category.xml index c7e4878..f772ab7 100644 --- a/data/ir_module_category.xml +++ b/data/ir_module_category.xml @@ -1,4 +1,6 @@ <?xml version="1.0" encoding="utf-8"?> +<!-- Copyright 2017 Le Filament (<https://www.le-filament.com>) + License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). --> <odoo> <data> <record model="ir.module.category" id="module_category_dashboard"> diff --git a/models/__init__.py b/models/__init__.py index 96414b7..f35384a 100644 --- a/models/__init__.py +++ b/models/__init__.py @@ -1,3 +1,5 @@ +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). + from . import lefilament_tdb from . import res_company -from . import hr_employee \ No newline at end of file +from . import hr_employee diff --git a/models/lefilament_tdb.py b/models/lefilament_tdb.py index cdea31b..3b0042f 100644 --- a/models/lefilament_tdb.py +++ b/models/lefilament_tdb.py @@ -18,19 +18,16 @@ class LeFilamentTdb(models.Model): date_tdb = fields.Date('Date', required=True, default=Date.context_today, - store=True - ) + store=True) ca_mois = fields.Float('Facturé', compute="dashboard_values", store=True) cmd_mois = fields.Float('Commandes', compute="dashboard_values", - store=True - ) + store=True) pipe_mois = fields.Float('Pipe', compute="dashboard_values", store=True) treso = fields.Float('Trésorerie', compute="dashboard_values", store=True) variation = fields.Float('Variation', compute="dashboard_values", - store=True - ) + store=True) charges = fields.Float('Décaissé', compute="dashboard_values", store=True) encaisse = fields.Float('Encaissé', compute="dashboard_values", store=True) charges_fixes = fields.Float('Charges Fixes', default=10000) @@ -148,14 +145,12 @@ class LeFilamentTdb(models.Model): 'Sept', 'Oct', 'Nov', - 'Dec' - ] + 'Dec'] record.name = months[record.date_tdb.month-1] \ + " " + str(record.date_tdb.year) @api.model def _new_data(self): - print("Nouvelle ligne", Date.today()) self.create({'date_tdb': Date.today()}) @api.model @@ -259,12 +254,12 @@ class LeFilamentTdb(models.Model): (SELECT SUM(e.total_amount) FROM hr_expense_sheet es, hr_expense e WHERE es.id = e.sheet_id - AND e.payment_mode='own_account' - AND es.state!='done' + AND e.payment_mode = 'own_account' + AND es.state != 'done' ) AS cca, (SELECT SUM(price_subtotal - qty_invoiced * price_unit) FROM sale_order_line - WHERE invoice_status='to invoice' + WHERE invoice_status = 'to invoice' ) AS commandes; """ % (fiscal_year, @@ -275,8 +270,7 @@ class LeFilamentTdb(models.Model): fiscal_year_next, fiscal_year, fiscal_year, - fiscal_year - ) + fiscal_year) ) datas = self._cr.dictfetchall() @@ -342,8 +336,8 @@ class LeFilamentTdb(models.Model): (SELECT SUM(e.total_amount) AS fonds_propres FROM hr_expense_sheet es, hr_expense e WHERE es.id = e.sheet_id - AND e.payment_mode='own_account' - AND es.state!='done' + AND e.payment_mode = 'own_account' + AND es.state != 'done' ) AS cca, (SELECT SUM(capital) AS capital FROM hr_employee) AS capital; """ @@ -396,7 +390,7 @@ class LeFilamentTdb(models.Model): ELSE 0 END ) AS f_client FROM account_invoice - WHERE state!='draft' AND state != 'paid' + WHERE state != 'draft' AND state != 'paid' GROUP BY date_trunc('month', date_due) ORDER BY date_trunc('month', date_due); """ diff --git a/models/res_company.py b/models/res_company.py index d9f309f..6dbc4e0 100644 --- a/models/res_company.py +++ b/models/res_company.py @@ -11,8 +11,7 @@ class res_company(models.Model): charges_fixes = fields.Integer('Charges Fixes') previ_treso_ids = fields.One2many('previ.treso', 'company_id', - 'Prévisionnel' - ) + 'Prévisionnel') class previ_treso(models.Model): diff --git a/security/lefilament_dashboard_security.xml b/security/lefilament_dashboard_security.xml index de335ff..5aeff45 100644 --- a/security/lefilament_dashboard_security.xml +++ b/security/lefilament_dashboard_security.xml @@ -1,4 +1,6 @@ <?xml version="1.0" encoding="utf-8"?> +<!-- Copyright 2017 Le Filament (<https://www.le-filament.com>) + License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). --> <odoo> <data noupdate="0"> diff --git a/static/src/xml/lefilament_tdb.xml b/static/src/xml/lefilament_tdb.xml index a0548c2..c3843c7 100644 --- a/static/src/xml/lefilament_tdb.xml +++ b/static/src/xml/lefilament_tdb.xml @@ -1,4 +1,6 @@ <?xml version="1.0" encoding="UTF-8"?> +<!-- Copyright 2017 Le Filament (<https://www.le-filament.com>) + License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). --> <templates xml:space="preserve"> <t t-name="YearDashboard"> @@ -221,4 +223,4 @@ </div> </t> -</templates> \ No newline at end of file +</templates> diff --git a/static/src/xml/lefilament_treso.xml b/static/src/xml/lefilament_treso.xml index 11792f6..5772053 100644 --- a/static/src/xml/lefilament_treso.xml +++ b/static/src/xml/lefilament_treso.xml @@ -1,4 +1,6 @@ <?xml version="1.0" encoding="UTF-8"?> +<!-- Copyright 2017 Le Filament (<https://www.le-filament.com>) + License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). --> <templates xml:space="preserve"> @@ -16,4 +18,4 @@ </t> -</templates> \ No newline at end of file +</templates> diff --git a/views/assets.xml b/views/assets.xml index caeeb20..cc56789 100644 --- a/views/assets.xml +++ b/views/assets.xml @@ -1,4 +1,6 @@ <?xml version="1.0" encoding="utf-8"?> +<!-- Copyright 2017 Le Filament (<https://www.le-filament.com>) + License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). --> <odoo> <data> diff --git a/views/schedule.xml b/views/schedule.xml index 779bd48..e6d210d 100644 --- a/views/schedule.xml +++ b/views/schedule.xml @@ -1,3 +1,6 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- Copyright 2017 Le Filament (<https://www.le-filament.com>) + License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). --> <odoo> <data noupdate="1"> <record id="ir_cron_lefilament_tdb" model="ir.cron"> diff --git a/views/views.xml b/views/views.xml index 89432a5..15b7eaf 100644 --- a/views/views.xml +++ b/views/views.xml @@ -1,4 +1,6 @@ <?xml version="1.0" encoding="utf-8"?> +<!-- Copyright 2017 Le Filament (<https://www.le-filament.com>) + License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). --> <odoo> <data> -- GitLab