-
-
Save gabrielbalog/76b562e5e1a248e05aa64d0bb29b5b84 to your computer and use it in GitHub Desktop.
Revisions
-
gabrielbalog revised this gist
Feb 12, 2018 . 1 changed file with 11 additions and 8 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,8 +1,11 @@ def _prepare_edoc_vals(self, inv, inv_lines): res = super(AccountInvoice, self)._prepare_edoc_vals(inv, inv_lines) if res.get('nfse_eletronic'): res['nfse_eletronic'] = inv.nfse_eletronic res['ambiente_nfse'] = 'homologacao' \ if inv.company_id.tipo_ambiente_nfse == '2' else 'producao' res['serie'] = inv.service_serie_id.id res['serie_documento'] = inv.service_serie_id.code res['model'] = inv.service_document_id.code res['numero'] = inv.service_serie_id.internal_sequence_id.next_by_id() return res -
gabrielbalog created this gist
Feb 8, 2018 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,8 @@ ''' Função que concatena o nome e o sobrenome para a variavel name. Lembrar de chama-la quando houver insercao por meio da API. ''' @api.onchange('fst_name', 'sec_name') def _compute_new_name(self): if self.fst_name and self.sec_name: self.name = ('%s %s') %(self.fst_name, self.sec_name)