Skip to content
Snippets Groups Projects
Commit 16c803c0 authored by Benjamin - Le Filament's avatar Benjamin - Le Filament
Browse files

[update] delete scop_liasse_fiscale.py

parent 79230eed
Branches 12.0
No related tags found
No related merge requests found
......@@ -5,5 +5,4 @@ from . import riga_files_matching
from . import riga_ftp_channel
from . import riga_lookup_table
from . import riga_odoo_import
from . import scop_liasse_fiscale
from . import scop_questionnaire
# © 2019 Le Filament (<http://www.le-filament.com>)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from odoo import models, fields, api
class ScopQuestionnaireImport(models.Model):
_inherit = "scop.liasse.fiscale"
year_riga = fields.Char("Année Riga")
type_id = fields.Many2one(compute="_compute_fields", store=True)
year = fields.Char(compute="_compute_fields", store=True)
# ------------------------------------------------------
# Fonctions compute
# ------------------------------------------------------
@api.depends('year_riga')
@api.multi
def _compute_fields(self):
for liasse in self:
if liasse.year_riga != '14443':
year = liasse.env['riga.lookup.table'].search([
['id_riga', '=', liasse.year_riga]])
liasse.year = year.name
liasse.type_id = liasse.env.ref(
'cgscop_liste_ministere.liasse_type_2').id
else:
if liasse.partner_id.date_1st_sign:
liasse.year = liasse.partner_id.date_1st_sign.year
liasse.type_id = liasse.env.ref(
'cgscop_liste_ministere.liasse_type_1').id
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment