Skip to content

Commit

Permalink
Merge pull request #734 from Som-Energia/improves_wizard_load_records…
Browse files Browse the repository at this point in the history
…_auvidi

Millores en wizard de carregar registres AUVIDI
  • Loading branch information
pauboixsom authored Oct 22, 2024
2 parents e23f274 + defc5b2 commit 6ca9289
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions som_auvidi/wizard/wizard_load_servei_gen_records_from_file.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,26 @@ def get_polissa_from_record_data(self, cursor, uid, cups_name, data, context=Non

return polissa_id

def get_aux_dict_from_row(self, cursor, uid, row, tipus='contracte', context=None):
if context is None:
context = {}

aux_dict = {
'data_inici': False,
'data_sortida': row[2],
'percentatge': row[3].replace(',', '.'),
}

if tipus == 'empresa':
aux_dict.update({
'cups': row[1],
})
else:
aux_dict.update({
'nif': row[0],
})
return aux_dict

def validate_data_and_get_state_contract(
self, cursor, uid, polissa_id, record_data, context=None):
"""
Expand Down

0 comments on commit 6ca9289

Please sign in to comment.