Browse Source

Recu fisval PDF

master
root 3 years ago
parent
commit
5f0f36bde1
6 changed files with 100 additions and 20 deletions
  1. +4
    -3
      __manifest__.py
  2. +0
    -1
      models/__init__.py
  3. +10
    -10
      models/operation.py
  4. +6
    -6
      models/partner.py
  5. +79
    -0
      report/report_donationtax.xml
  6. +1
    -0
      views/partner.xml

+ 4
- 3
__manifest__.py View File

@ -20,7 +20,7 @@
'version': '0.1',
# any module necessary for this one to work correctly
'depends': ['base','mail','mass_mailing','donation_recurring','website_sale'],
'depends': ['base','donation_recurring','website_sale'],
# always loaded
'data': [
@ -34,12 +34,13 @@
'views/relationship.xml',
'views/operation.xml',
'views/templates.xml',
'views/mail_mail.xml',
#'views/mail_mail.xml',
'views/returnmail.xml',
'views/payment_batch.xml',
'views/website_sale.xml',
'views/aggregate.xml',
'wizard/operation_duplicate_wizard.xml'
'wizard/operation_duplicate_wizard.xml',
'report/report_donationtax.xml'
#'views/website_donation.xml'


+ 0
- 1
models/__init__.py View File

@ -7,7 +7,6 @@ from . import address
from . import email
from . import phone
from . import operation
from . import mailing_mailing
from . import relationship
from . import returnmail
from . import payment_batch


+ 10
- 10
models/operation.py View File

@ -13,16 +13,16 @@ import os,secrets
_logger = logging.getLogger(__name__)
MASS_MAILING_BUSINESS_MODELS = [
'crm.lead',
'event.registration',
'hr.applicant',
'res.partner',
'event.track',
'sale.order',
'mailing.list',
'mailing.contact'
]
# MASS_MAILING_BUSINESS_MODELS = [
# 'crm.lead',
# 'event.registration',
# 'hr.applicant',
# 'res.partner',
# 'event.track',
# 'sale.order',
# 'mailing.list',
# 'mailing.contact'
# ]
class opendons_operation(models.Model):
_name = 'opendons.operation'


+ 6
- 6
models/partner.py View File

@ -157,9 +157,9 @@ class partner(models.Model):
)
key=fields.Integer(
#compute='_compute_key',
compute='_compute_key',
string="Key",
#store=True,
store=True,
readonly=True
)
@ -216,7 +216,7 @@ class partner(models.Model):
@api.constrains('phone')
def _onchange_phone(self):
if self.mobile:
regex = re.compile(r'(^(?:(?:\+|00)33[\s.-]{0,3}(?:\(0\)[\s.-]{0,3})?|0)[1-9](?:(?:[\s.-]?\d{2}){4}|\d{2}(?:[\s.-]?\d{3}){2})$)+')
# 0123456789
@ -267,7 +267,7 @@ class partner(models.Model):
#validation IBAN
#https://www.regextester.com/115565
if self.acc_number:
regex = re.compile(r'(^(?:(?:IT|SM)\d{2}[A-Z]\d{22}|CY\d{2}[A-Z]\d{23}|NL\d{2}[A-Z]{4}\d{10}|LV\d{2}[A-Z]{4}\d{13}|(?:BG|BH|GB|IE)\d{2}[A-Z]{4}\d{14}|GI\d{2}[A-Z]{4}\d{15}|RO\d{2}[A-Z]{4}\d{16}|KW\d{2}[A-Z]{4}\d{22}|MT\d{2}[A-Z]{4}\d{23}|NO\d{13}|(?:DK|FI|GL|FO)\d{16}|MK\d{17}|(?:AT|EE|KZ|LU|XK)\d{18}|(?:BA|HR|LI|CH|CR)\d{19}|(?:GE|DE|LT|ME|RS)\d{20}|IL\d{21}|(?:AD|CZ|ES|MD|SA)\d{22}|PT\d{23}|(?:BE|IS)\d{24}|(?:FR|MR|MC)\d{25}|(?:AL|DO|LB|PL)\d{26}|(?:AZ|HU)\d{27}|(?:GR|MU)\d{28})$)+')
if not re.fullmatch(regex, self.acc_number):
@ -279,8 +279,8 @@ class partner(models.Model):
#validation IBAN
#https://www.regextester.com/115565
if self.acc_number:
regex = re.compile(r'(^(?:(?:IT|SM)\d{2}[A-Z]\d{22}|CY\d{2}[A-Z]\d{23}|NL\d{2}[A-Z]{4}\d{10}|LV\d{2}[A-Z]{4}\d{13}|(?:BG|BH|GB|IE)\d{2}[A-Z]{4}\d{14}|GI\d{2}[A-Z]{4}\d{15}|RO\d{2}[A-Z]{4}\d{16}|KW\d{2}[A-Z]{4}\d{22}|MT\d{2}[A-Z]{4}\d{23}|NO\d{13}|(?:DK|FI|GL|FO)\d{16}|MK\d{17}|(?:AT|EE|KZ|LU|XK)\d{18}|(?:BA|HR|LI|CH|CR)\d{19}|(?:GE|DE|LT|ME|RS)\d{20}|IL\d{21}|(?:AD|CZ|ES|MD|SA)\d{22}|PT\d{23}|(?:BE|IS)\d{24}|(?:FR|MR|MC)\d{25}|(?:AL|DO|LB|PL)\d{26}|(?:AZ|HU)\d{27}|(?:GR|MU)\d{28})$)+')
regex = re.compile(r'(/^(?:(?:IT|SM)\d{2}[A-Z]\d{22}|CY\d{2}[A-Z]\d{23}|NL\d{2}[A-Z]{4}\d{10}|LV\d{2}[A-Z]{4}\d{13}|(?:BG|BH|GB|IE)\d{2}[A-Z]{4}\d{14}|GI\d{2}[A-Z]{4}\d{15}|RO\d{2}[A-Z]{4}\d{16}|KW\d{2}[A-Z]{4}\d{22}|MT\d{2}[A-Z]{4}\d{23}|NO\d{13}|(?:DK|FI|GL|FO)\d{16}|MK\d{17}|(?:AT|EE|KZ|LU|XK)\d{18}|(?:BA|HR|LI|CH|CR)\d{19}|(?:GE|DE|LT|ME|RS)\d{20}|IL\d{21}|(?:AD|CZ|ES|MD|SA)\d{22}|PT\d{23}|(?:BE|IS)\d{24}|(?:FR|MR|MC)\d{25}|(?:AL|DO|LB|PL)\d{26}|(?:AZ|HU)\d{27}|(?:GR|MU)\d{28})$)+')
if not re.fullmatch(regex, self.acc_number):

+ 79
- 0
report/report_donationtax.xml View File

@ -0,0 +1,79 @@
<?xml version="1.0" encoding="utf-8" ?>
<odoo>
<template id="opendons_template_donation_tax_receipt" inherit_id="donation_base.report_donationtaxreceipt_document">
<xpath expr="//div[@class='page']" position="replace">
<table border="1" cellspacing="0">
<tr>
<td>Logo</td>
<td>Paris le 25 mars 2022</td>
</tr>
<tr>
<td>adresse</td>
</tr>
<tr>
<td>ref donateur</td><td>flashcode</td>
</tr>
<tr>
<td width="50%"></td><td>adresse</td>
</tr>
<tr>
<td colspan="2">Cher donateur,
Cette semaine, grâce à votre aide et votre grande générosité, nous avons pu récolter assez de fonds pour pouvoir mettre en oeuvre notre projet.
C'est donc heureux et plus motivés que jamais que nous débutons la première phase des travaux qui permettront, comme vous le savez, d'accompagner des centaines de personnes dans le besoin et de leur redonner un peu d'espoir.
Nous vous remercions du fond du coeur pour ce beau projet que vous venez de rendre possible grâce à vos dons. Nous n'aurions jamais pu en arriver là où nous en sommes aujourd'hui sans vos généreux dons.t
</td>
</tr>
<tr>
<td width="50%"></td><td>signature</td>
</tr>
<tr>
<td width="50%"></td><td>Nom responsable donateur</td>
</tr>
<tr>
<td width="50%">
CERFA logo+ logo 2 +adresse
</td>
<td>
NUMERO D'ORDRE: S0061709
reconnait avoir reçu à titre de don la somme de : ***100,00 € ***
</td>
</tr>
<tr>
<td width="50%">
Reçu - Objet Association
</td>
<td>
Date de versement : 08/03/2022
Forme du don : Don manuel
Nature du don : Numéraire
Mode de versement : carte bancaire
Ref donateur
Nom et adresse donateur
</td>
</tr>
</table>
</xpath>
</template>
</odoo>

+ 1
- 0
views/partner.xml View File

@ -79,6 +79,7 @@
<field name="id"/>
<field name="key"/>
<field name="source"/>
<field name="company_id"/>
<field name="parent_id" string="Company Name"


Loading…
Cancel
Save