diff --git a/LICENSE b/LICENSE index 7e5dad22c284347a94943bae488585d0f873592e..33aa54e42256094f481eb4f0de5dfb73e4b50bb5 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 899bcc97f0f42fb135de323f88b31f8ed0bea48b..31660d6a9650857f10c9dbdcd139145e0897ef6e 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 566f2966eeda3e7a9b1f2fec4819f3f15114703d..119b63f0fd47252830e8063dbcd001248559520f 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 c7e4878d0f7b96a0d9ae615862d14654e01b6274..f772ab7fa05bac72fc1aef63caa0f7d07472ffb1 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 96414b71b764227af2493ecd20e43f942b0cfc0b..f35384adde2fe69207e37b171d417cf8b17c29fa 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 cdea31baaeeee424ef1b51aa1314adee1255a802..3b0042fcb4dd43189300512ec9a22b91c71dbf78 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 d9f309f36ecdaf868f150903ff3a7c8dbb63c24c..6dbc4e060e01a50aa53948e7af7e64d976689a87 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 de335fffcfe9ede3995424a208c1f82a0eadc3f7..5aeff45c677a4d77e9e7984ec1e4b48ab1ae3a0d 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 a0548c272ab3657e1c6971548376a4904ac46cb5..c3843c7c7021d3b702eda6396a55b1bffc19227e 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 11792f646382c5cc4bd5f3d2100da85fb10a2da7..577205309cd86fece4935659a874017ddb35e38a 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 caeeb20ff3cefefd0abf48ff4c6e0f7af481cda3..cc567894c9403ebc39eaa0913f12acbed35679cb 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 779bd48d930e395b6fa10faf9017105bf4f0e431..e6d210deb31eac6e465136f73ca13d8118596bbc 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 89432a571c35fe35e590777e4afb2763c8c75b0f..15b7eaf12968fbcbf83b1efd05d887936c5708e9 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>