Skip to content

Commit

Permalink
🐛 (gurb): Put filename amb no more extra intro
Browse files Browse the repository at this point in the history
Co-authored-by: Pau Boix <[email protected]>
  • Loading branch information
destanyol and pauboixsom committed Nov 12, 2024
1 parent 9ce9515 commit 5d70fb3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion som_gurb/wizard/wizard_create_coef_file.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ def create_txt(self, cursor, uid, items, date, context=None):
line = "{};{}\r\n".format(item["cups"], item["coef"])
txt += line

mfile = base64.b64encode(txt.encode('utf-8'))
mfile = base64.b64encode(txt[:-2].encode('utf-8'))

return file_name, mfile

Expand Down
3 changes: 1 addition & 2 deletions som_gurb/wizard/wizard_create_coef_file_view.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@
<button name="create_coeficients_file_txt" type="object" string="Crear fitxer de Coeficients" icon="gtk-execute" colspan="4"/>
</group>
<group colspan="4" attrs="{'invisible': [('state', '==', 'init')]}">
<field name="file" colspan="4" />
<field name="file_name" colspan="4"/>
<field name="file" colspan="4" filename="file_name" />
<button special="cancel" string="Tancar" icon="gtk-close" colspan="4" />
</group>
</form>
Expand Down

0 comments on commit 5d70fb3

Please sign in to comment.