Skip to content

Commit

Permalink
add vol, peso e num NFE (#1066)
Browse files Browse the repository at this point in the history
Co-authored-by: Johny Chen Jy <[email protected]>
  • Loading branch information
danimaribeiro and carcaroff authored Apr 8, 2021
1 parent 84884c4 commit 9c33549
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
13 changes: 13 additions & 0 deletions l10n_br_sale/models/account_move.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,16 @@ class AccountMove(models.Model):
_inherit = 'account.move'

carrier_partner_id = fields.Many2one('res.partner', string='Transportadora')
num_volumes = fields.Integer('Quant. total de volumes')
quant_peso = fields.Float('Peso')
# peso_uom = fields.Many2one('uom.uom')

nfe_number = fields.Integer(
string=u"Número NFe", compute="_compute_nfe_number")

def _compute_nfe_number(self):
for item in self:
docs = self.env['invoice.eletronic'].search(
[('invoice_id', '=', item.id)])
if docs:
item.nfe_number = docs[0].numero
3 changes: 3 additions & 0 deletions l10n_br_sale/views/account_move_views.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@
<group id="carrier_tab_group">
<group string="Informações da Transportadora">
<field name="carrier_partner_id"/>
<field name="num_volumes"/>
<field name="quant_peso"/>
<!-- <field name="peso_uom"/>-->
</group>
</group>
</page>
Expand Down

0 comments on commit 9c33549

Please sign in to comment.