|
@ -1,6 +1,7 @@ |
|
|
from odoo import models, fields, api |
|
|
from odoo import models, fields, api |
|
|
from odoo.exceptions import UserError, ValidationError |
|
|
from odoo.exceptions import UserError, ValidationError |
|
|
from psycopg2 import sql, DatabaseError |
|
|
from psycopg2 import sql, DatabaseError |
|
|
|
|
|
from datetime import datetime |
|
|
|
|
|
|
|
|
from werkzeug import utils |
|
|
from werkzeug import utils |
|
|
import base64 |
|
|
import base64 |
|
@ -40,16 +41,30 @@ class DonationDonation(models.Model): |
|
|
# bic_direct_debit = fields.Char( |
|
|
# bic_direct_debit = fields.Char( |
|
|
# 'bic' |
|
|
# 'bic' |
|
|
# ) |
|
|
# ) |
|
|
# start_date_direct_debit = fields.Date( |
|
|
|
|
|
# string='Start Date', |
|
|
|
|
|
# index=True, |
|
|
|
|
|
# track_visibility='onchange' |
|
|
|
|
|
# ) |
|
|
|
|
|
# end_date_direct_debit = fields.Date( |
|
|
|
|
|
# string='End Date', |
|
|
|
|
|
# index=True, |
|
|
|
|
|
# track_visibility='onchange' |
|
|
|
|
|
# ) |
|
|
|
|
|
|
|
|
start_date = fields.Date( |
|
|
|
|
|
string='Start Date', |
|
|
|
|
|
index=True, |
|
|
|
|
|
default=datetime.today(), |
|
|
|
|
|
track_visibility='onchange' |
|
|
|
|
|
) |
|
|
|
|
|
end_date = fields.Date( |
|
|
|
|
|
string='End Date', |
|
|
|
|
|
index=True, |
|
|
|
|
|
readonly=True, |
|
|
|
|
|
track_visibility='onchange' |
|
|
|
|
|
) |
|
|
|
|
|
suspended_date = fields.Date( |
|
|
|
|
|
string='Suspended Date', |
|
|
|
|
|
index=True, |
|
|
|
|
|
readonly=True, |
|
|
|
|
|
track_visibility='onchange' |
|
|
|
|
|
) |
|
|
|
|
|
lastexecution_date = fields.Date( |
|
|
|
|
|
string='Last execution Date', |
|
|
|
|
|
index=True, |
|
|
|
|
|
readonly=True, |
|
|
|
|
|
track_visibility='onchange' |
|
|
|
|
|
) |
|
|
frequency =fields.Selection( |
|
|
frequency =fields.Selection( |
|
|
[('monthly','Monthly'), ('bimonthly','Bimonthly'),('quarterly','Quarterly'),('half-yearly','Half-yearly'),('annually','Annually')], |
|
|
[('monthly','Monthly'), ('bimonthly','Bimonthly'),('quarterly','Quarterly'),('half-yearly','Half-yearly'),('annually','Annually')], |
|
|
default='monthly' |
|
|
default='monthly' |
|
|