robin.keunen
5 years ago
55 changed files with 3943 additions and 3370 deletions
-
2.isort.cfg
-
42README.md
-
100easy_my_coop/__manifest__.py
-
25easy_my_coop/migrations/8.0.1.0/pre-migration.py
-
132easy_my_coop/models/account_invoice.py
-
5easy_my_coop/models/account_journal.py
-
60easy_my_coop/models/company.py
-
901easy_my_coop/models/coop.py
-
419easy_my_coop/models/operation_request.py
-
175easy_my_coop/models/partner.py
-
28easy_my_coop/models/product.py
-
5easy_my_coop/models/res_partner_bank.py
-
10easy_my_coop/report/account_invoice_report.py
-
10easy_my_coop/wizard/account_invoice_refund.py
-
210easy_my_coop/wizard/create_subscription_from_partner.py
-
49easy_my_coop/wizard/update_partner_info.py
-
44easy_my_coop/wizard/update_share_line.py
-
8easy_my_coop/wizard/validate_subscription_request.py
-
19easy_my_coop_be/__manifest__.py
-
19easy_my_coop_be/models/coop.py
-
14easy_my_coop_be/models/partner.py
-
46easy_my_coop_ch/__manifest__.py
-
27easy_my_coop_ch/models/coop.py
-
24easy_my_coop_ch/models/partner.py
-
63easy_my_coop_ch/views/certificate_template.xml
-
37easy_my_coop_dividend/__manifest__.py
-
227easy_my_coop_dividend/models/dividend.py
-
31easy_my_coop_export_xlsx/__manifest__.py
-
195easy_my_coop_export_xlsx/wizard/export_global_wizard.py
-
15easy_my_coop_fr/__manifest__.py
-
20easy_my_coop_fr/models/coop.py
-
16easy_my_coop_fr/models/partner.py
-
28easy_my_coop_loan/__manifest__.py
-
112easy_my_coop_loan/models/interest_line.py
-
184easy_my_coop_loan/models/loan.py
-
110easy_my_coop_loan/models/loan_issue_line.py
-
6easy_my_coop_loan/models/partner.py
-
7easy_my_coop_loan/tests/test_emc_loan.py
-
19easy_my_coop_loan_website/__manifest__.py
-
68easy_my_coop_loan_website/controllers/main.py
-
2easy_my_coop_taxshelter_report/__manifest__.py
-
6easy_my_coop_taxshelter_report/models/mail_template.py
-
82easy_my_coop_taxshelter_report/models/tax_shelter_declaration.py
-
22easy_my_coop_website/__manifest__.py
-
398easy_my_coop_website/controllers/main.py
-
23easy_my_coop_website_portal/__manifest__.py
-
291easy_my_coop_website_portal/controllers/main.py
-
33easy_my_coop_website_taxshelter/__manifest__.py
-
122easy_my_coop_website_taxshelter/controllers/main.py
-
16partner_age/__manifest__.py
-
39partner_age/models/partner.py
-
28theme_light/__manifest__.py
-
32website_recaptcha_reloaded/__manifest__.py
-
18website_recaptcha_reloaded/models/res_config.py
-
39website_recaptcha_reloaded/website.py
@ -1,2 +1,44 @@ |
|||||
# vertical-cooperative |
# vertical-cooperative |
||||
This repository gather odoo modules for cooperatives |
This repository gather odoo modules for cooperatives |
||||
|
|
||||
|
# MAKE TRAVIS GREEN AGAIN |
||||
|
|
||||
|
pre-commit still issues these messages. They need to be fixed. |
||||
|
|
||||
|
``` |
||||
|
************* Module easy_my_coop.models.partner |
||||
|
easy_my_coop/models/partner.py:56: [E8103(sql-injection), ResPartner._invoice_total] SQL injection risk. Use parameters if you can. - More info https://github.com/OCA/odoo-community.org/blob/master/website/Contribution/CONTRIBUTING.rst#no-sql-injection |
||||
|
************* Module partner_age.models.partner |
||||
|
partner_age/models/partner.py:13: [E8103(sql-injection), ResPartner._search_age] SQL injection risk. Use parameters if you can. - More info https://github.com/OCA/odoo-community.org/blob/master/website/Contribution/CONTRIBUTING.rst#no-sql-injection |
||||
|
************* Module easy_my_coop_taxshelter_report.models.tax_shelter_declaration |
||||
|
easy_my_coop_taxshelter_report/models/tax_shelter_declaration.py:325: [E8102(invalid-commit), TaxShelterCertificate.send_certificates] Use of cr.commit() directly - More info https://github.com/OCA/odoo-community.org/blob/master/website/Contribution/CONTRIBUTING.rst#never-commit-the-transaction |
||||
|
************* Module easy_my_coop.models.account_invoice |
||||
|
easy_my_coop/models/account_invoice.py:11: [C8104(class-camelcase), account_invoice] Use `CamelCase` "AccountInvoice" in class name "account_invoice". You can use oca-autopep8 of https://github.com/OCA/maintainer-tools to auto fix it. |
||||
|
************* Module easy_my_coop.models.operation_request |
||||
|
easy_my_coop/models/operation_request.py:12: [C8104(class-camelcase), operation_request] Use `CamelCase` "OperationRequest" in class name "operation_request". You can use oca-autopep8 of https://github.com/OCA/maintainer-tools to auto fix it. |
||||
|
************* Module easy_my_coop.models.coop |
||||
|
easy_my_coop/models/coop.py:287: [C8108(method-compute), SubscriptionRequest] Name of compute method should start with "_compute_" |
||||
|
************* Module website_recaptcha_reloaded.models.res_config |
||||
|
website_recaptcha_reloaded/models/res_config.py:7: [C8104(class-camelcase), website_config_settings] Use `CamelCase` "WebsiteConfigSettings" in class name "website_config_settings". You can use oca-autopep8 of https://github.com/OCA/maintainer-tools to auto fix it. |
||||
|
************* Module easy_my_coop.models.company |
||||
|
easy_my_coop/models/company.py:61: [C8108(method-compute), ResCompany] Name of compute method should start with "_compute_" |
||||
|
|
||||
|
pylint with mandatory checks.............................................Failed |
||||
|
- hook id: pylint |
||||
|
- exit code: 18 |
||||
|
|
||||
|
************* Module easy_my_coop.models.partner |
||||
|
easy_my_coop/models/partner.py:56: [E8103(sql-injection), ResPartner._invoice_total] SQL injection risk. Use parameters if you can. - More info https://github.com/OCA/odoo-community.org/blob/master/website/Contribution/CONTRIBUTING.rst#no-sql-injection |
||||
|
************* Module partner_age.models.partner |
||||
|
partner_age/models/partner.py:13: [E8103(sql-injection), ResPartner._search_age] SQL injection risk. Use parameters if you can. - More info https://github.com/OCA/odoo-community.org/blob/master/website/Contribution/CONTRIBUTING.rst#no-sql-injection |
||||
|
************* Module easy_my_coop.models.account_invoice |
||||
|
easy_my_coop/models/account_invoice.py:11: [C8104(class-camelcase), account_invoice] Use `CamelCase` "AccountInvoice" in class name "account_invoice". You can use oca-autopep8 of https://github.com/OCA/maintainer-tools to auto fix it. |
||||
|
************* Module easy_my_coop.models.operation_request |
||||
|
easy_my_coop/models/operation_request.py:12: [C8104(class-camelcase), operation_request] Use `CamelCase` "OperationRequest" in class name "operation_request". You can use oca-autopep8 of https://github.com/OCA/maintainer-tools to auto fix it. |
||||
|
************* Module easy_my_coop.models.coop |
||||
|
easy_my_coop/models/coop.py:287: [C8108(method-compute), SubscriptionRequest] Name of compute method should start with "_compute_" |
||||
|
************* Module website_recaptcha_reloaded.models.res_config |
||||
|
website_recaptcha_reloaded/models/res_config.py:7: [C8104(class-camelcase), website_config_settings] Use `CamelCase` "WebsiteConfigSettings" in class name "website_config_settings". You can use oca-autopep8 of https://github.com/OCA/maintainer-tools to auto fix it. |
||||
|
************* Module easy_my_coop.models.company |
||||
|
easy_my_coop/models/company.py:61: [C8108(method-compute), ResCompany] Name of compute method should start with "_compute_" |
||||
|
``` |
901
easy_my_coop/models/coop.py
File diff suppressed because it is too large
View File
File diff suppressed because it is too large
View File
@ -1,37 +1,19 @@ |
|||||
# -*- coding: utf-8 -*- |
|
||||
############################################################################## |
|
||||
# |
|
||||
# Copyright (C) 2013-2017 Open Architects Consulting SPRL. |
|
||||
# Copyright (C) 2018- Coop IT Easy SCRLfs. |
|
||||
# |
|
||||
# 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 <http://www.gnu.org/licenses/>. |
|
||||
# |
|
||||
############################################################################## |
|
||||
|
# Copyright 2013-2018 Open Architects Consulting SPRL. |
||||
|
# Copyright 2018 Coop IT Easy SCRLfs (<http://www.coopiteasy.be>) |
||||
|
# - Houssine BAKKALI - <houssine@coopiteasy.be> |
||||
|
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). |
||||
{ |
{ |
||||
"name": "Easy My Coop CH", |
|
||||
|
"name": "Easy My Coop Switzerland", |
||||
|
"summary": "Easy My Coop Switzerland localization", |
||||
"version": "12.0.1.0.2", |
"version": "12.0.1.0.2", |
||||
"depends": ["easy_my_coop", |
|
||||
"l10n_ch"], |
|
||||
"author": "Houssine BAKKALI <houssine@coopiteasy.be>", |
|
||||
|
"license": "AGPL-3", |
||||
|
"depends": ["easy_my_coop", "l10n_ch"], |
||||
|
"author": "Coop IT Easy SCRLfs", |
||||
"category": "Cooperative management", |
"category": "Cooperative management", |
||||
'webstite': "www.coopiteasy.be", |
|
||||
"description": """ |
|
||||
This is the swiss localization for the easy my coop module |
|
||||
""", |
|
||||
'data': [ |
|
||||
'views/subscription_template.xml', |
|
||||
'views/subscription_request_view.xml' |
|
||||
|
"webstite": "www.coopiteasy.be", |
||||
|
"data": [ |
||||
|
"views/subscription_template.xml", |
||||
|
"views/subscription_request_view.xml", |
||||
], |
], |
||||
'installable': True, |
|
||||
|
"installable": True, |
||||
} |
} |
@ -1,63 +0,0 @@ |
|||||
<?xml version="1.0" encoding="utf-8"?> |
|
||||
<odoo> |
|
||||
<data> |
|
||||
<template id="certificate_i18n_fr" inherit_id="easy_my_coop.cooperator_certificat_G001_document" name="French Layout Certificate"> |
|
||||
<xpath expr="//div[@name='label_coop_number']" position="replace"> |
|
||||
<div name="label_coop_number" style="position:relative;top:35px;font-size:16;"> |
|
||||
<span>Ce document atteste de la souscription de parts sociales au capital de la SAS Coopérative à Capital Variable SuperQuinquin par </span> |
|
||||
<b><span t-field="o.name"></span></b> |
|
||||
<span>, enregistré(e) sous le <b>numéro de coopérateur </b></span> |
|
||||
<span t-field="o.cooperator_register_number"></span> |
|
||||
</div> |
|
||||
</xpath> |
|
||||
|
|
||||
<xpath expr="//div[@name='total_table']" position="after"> |
|
||||
<div name="legal_text" style="position:relative;top:145px;font-size:12;"> |
|
||||
<div>Ce document atteste d’une souscription en numéraire au capital d’une société, répondant à la définition communautaire de la Petite et Moyenne Entreprise, dont les titres ne sont pas admis aux négociations sur un marché d’instruments financiers français ou étranger en application de l’article 199 terdecies 0A du CGI.<br/> |
|
||||
Conformément aux statuts, les souscriptions de parts sociales de type A et B n’ouvre pas droit à rémunération.<br/> |
|
||||
La société remplit les conditions mentionnées aux c, d et e du 2° du I de l’article 199 terdecies-0 A du code général des impôts : <br/> |
|
||||
c) La société est soumise à l’impôt sur les sociétés dans les conditions de droit commun ;<br/> |
|
||||
<br/> |
|
||||
c bis) La société compte au moins deux salariés à la clôture de son premier exercice ou un salarié si elle est soumise à l’obligation de s’inscrire à la chambre de métiers et de l’artisanat ;<br/> |
|
||||
<br/> |
|
||||
d) La société exerce une activité commerciale, industrielle, artisanale, libérale ou agricole, à l’exclusion des activités procurant des revenus garantis en raison de l’existence d’un tarif réglementé de rachat de la production, des activités financières, des activités de gestion de patrimoine mobilier définie à l’article 885 O quater et des activités immobilières. Toutefois, les exclusions relatives à l’exercice d’une activité financière ou immobilière ne sont pas applicables aux entreprises solidaires mentionnées à l’article L. 3332-17-1 du code du travail.<br/> |
|
||||
La société n’exerce pas une activité de production d’électricité utilisant l’énergie radiative du soleil ;<br/> |
|
||||
<br/> |
|
||||
d bis) Les actifs de la société ne sont pas constitués de façon prépondérante de métaux précieux, d’œuvres d’art, d’objets de collection, d’antiquités, de chevaux de course ou de concours ou, sauf si l’objet même de son activité consiste en leur consommation ou en leur vente au détail, de vins ou d’alcools ;<br/> |
|
||||
<br/> |
|
||||
d ter) Les souscriptions au capital de la société confèrent aux souscripteurs les seuls droits résultant de la qualité d’actionnaire ou d’associé, à l’exclusion de toute autre contrepartie notamment sous la forme de tarifs préférentiels ou d’accès prioritaire aux biens produits ou aux services rendus par la société ;<br/> |
|
||||
<br/> |
|
||||
e) La société doit être une petite et moyenne entreprise qui satisfait à la définition des petites et moyennes entreprises qui figure à l’annexe I au règlement (CE) n° 800/2008 de la Commission du 6 août 2008 déclarant certaines catégories d’aide compatibles avec le marché commun en application des articles 87 et 88 du traité (Règlement général d’exemption par catégorie) ;<br/> |
|
||||
</div> |
|
||||
</div> |
|
||||
</xpath> |
|
||||
<xpath expr="//div[@name='board_commitee']" position="replace"> |
|
||||
<div name="" class="col-xs-6 pull-left" style="position:relative;top:105px;font-size:20;color:black;font-family:Roboto-Regular;"> |
|
||||
<div style="position:relative;top:105px;"> |
|
||||
Pour le Conseil d'administration de <span t-field="o.company_id.name"/>. |
|
||||
</div> |
|
||||
<div style="position:relative;top:110px;"> |
|
||||
<strong><span t-field="o.company_id.board_representative"/></strong> |
|
||||
</div> |
|
||||
<div style="position:relative;top:115px;"> |
|
||||
<img t-if="o.company_id.signature_scan" t-att-src="'data:image/png;base64,%s' % o.company_id.signature_scan" style="width:240px;height:180px;padding-bottom:5px;"/> |
|
||||
</div> |
|
||||
</div> |
|
||||
</xpath> |
|
||||
</template> |
|
||||
|
|
||||
<template id="capital_release_request_i18n_fr" inherit_id="easy_my_coop.theme_invoice_G002_document" name="French Layout Certificate"> |
|
||||
<xpath expr="//p[@t-if='o.comment']" position="before"> |
|
||||
<div class="row"> |
|
||||
<div style="position:relative;top:225px;font-size:16;"> |
|
||||
Votre demande de souscription de parts sociales, détaillé dans le tableau ci-dessus, a bien été prise en compte.<br/> |
|
||||
<br/> |
|
||||
Afin de valider votre enregistrement en tant que coopérateur, vous devez tout d’abord procéder au paiement de celles-ci.<br/> |
|
||||
<br/> |
|
||||
Un email contenant les instructions de paiement vous a également été envoyé.<br/> |
|
||||
</div> |
|
||||
</div> |
|
||||
</xpath> |
|
||||
</template> |
|
||||
</data> |
|
||||
</odoo> |
|
@ -1,34 +1,41 @@ |
|||||
from datetime import datetime |
from datetime import datetime |
||||
from openerp.tools import DEFAULT_SERVER_DATE_FORMAT as OE_DFORMAT |
|
||||
|
|
||||
from openerp import models, fields, api |
|
||||
|
from openerp import api, fields, models |
||||
|
from openerp.tools import DEFAULT_SERVER_DATE_FORMAT as OE_DFORMAT |
||||
|
|
||||
|
|
||||
class ResPartner(models.Model): |
class ResPartner(models.Model): |
||||
_inherit = 'res.partner' |
|
||||
|
_inherit = "res.partner" |
||||
|
|
||||
def _search_age(self, operator, value): |
def _search_age(self, operator, value): |
||||
if operator not in ('=', '!=', '<', '<=', '>', '>=', 'in', 'not in'): |
|
||||
|
if operator not in ("=", "!=", "<", "<=", ">", ">=", "in", "not in"): |
||||
return [] |
return [] |
||||
query = """SELECT id |
query = """SELECT id |
||||
FROM "%s" |
FROM "%s" |
||||
WHERE extract(year from age(CURRENT_DATE, |
WHERE extract(year from age(CURRENT_DATE, |
||||
birthdate_date)) %s %%s""" % \ |
|
||||
(self._table, operator) |
|
||||
|
birthdate_date)) %s %%s""" % ( |
||||
|
self._table, |
||||
|
operator, |
||||
|
) |
||||
self.env.cr.execute(query, (value,)) |
self.env.cr.execute(query, (value,)) |
||||
ids = [t[0] for t in self.env.cr.fetchall()] |
ids = [t[0] for t in self.env.cr.fetchall()] |
||||
return [('id', 'in', ids)] |
|
||||
|
return [("id", "in", ids)] |
||||
|
|
||||
@api.one |
|
||||
@api.depends('birthdate_date') |
|
||||
|
@api.multi |
||||
|
@api.depends("birthdate_date") |
||||
def _compute_age(self): |
def _compute_age(self): |
||||
|
self.ensure_one() |
||||
if self.birthdate_date: |
if self.birthdate_date: |
||||
dBday = datetime.strptime(str(self.birthdate_date), |
|
||||
OE_DFORMAT).date() |
|
||||
|
dBday = datetime.strptime( |
||||
|
str(self.birthdate_date), OE_DFORMAT |
||||
|
).date() |
||||
dToday = datetime.now().date() |
dToday = datetime.now().date() |
||||
self.age = dToday.year - dBday.year - (( |
|
||||
dToday.month, dToday.day) < (dBday.month, dBday.day)) |
|
||||
|
self.age = ( |
||||
|
dToday.year |
||||
|
- dBday.year |
||||
|
- ((dToday.month, dToday.day) < (dBday.month, dBday.day)) |
||||
|
) |
||||
|
|
||||
age = fields.Integer(string='Age', |
|
||||
compute='_compute_age', |
|
||||
search='_search_age') |
|
||||
|
age = fields.Integer( |
||||
|
string="Age", compute="_compute_age", search="_search_age" |
||||
|
) |
@ -1,26 +1,14 @@ |
|||||
# Copyright 2004 Tech-Receptives Solutions Pvt. Ltd. |
# Copyright 2004 Tech-Receptives Solutions Pvt. Ltd. |
||||
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). |
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). |
||||
{ |
{ |
||||
'name': 'Website reCAPTCHA Reloaded', |
|
||||
'version': '12.0.0.1', |
|
||||
'category': 'Website', |
|
||||
'depends': ['website'], |
|
||||
'author': 'Tech Receptives', |
|
||||
'license': 'AGPL-3', |
|
||||
'website': 'https://www.techreceptives.com', |
|
||||
'description': """ |
|
||||
Odoo Website reCAPTCHA Reloaded |
|
||||
================================ |
|
||||
This modules allows you to integrate Google reCAPTCHA v2.0 to your website |
|
||||
forms. You can configure your Google reCAPTCHA site and public keys |
|
||||
in "Settings" -> "Website Settings" |
|
||||
|
|
||||
You will need to install various website_<module>_recaptcha modules |
|
||||
to use it in your various pages. |
|
||||
""", |
|
||||
'data': [ |
|
||||
'views/website_view.xml', |
|
||||
'views/res_config.xml', |
|
||||
], |
|
||||
'installable': True, |
|
||||
|
"name": "Website reCAPTCHA Reloaded", |
||||
|
"version": "12.0.0.0.1", |
||||
|
"category": "Website", |
||||
|
"depends": ["website"], |
||||
|
"author": "Tech Receptives", |
||||
|
"license": "AGPL-3", |
||||
|
"website": "https://www.techreceptives.com", |
||||
|
"summary": "Add google recaptcha to forms.", |
||||
|
"data": ["views/website_view.xml", "views/res_config.xml"], |
||||
|
"installable": True, |
||||
} |
} |
Write
Preview
Loading…
Cancel
Save
Reference in new issue