Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FIX] l10n_br_eletronic_document #1145

Open
wants to merge 1 commit into
base: 14.0
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions l10n_br_eletronic_document/models/account_move.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,16 @@ def _get_default_policy(self):
('after_payment', 'Emitir após pagamento'),
('manually', 'Manualmente')], string="Nota Eletrônica", default=_get_default_policy)
carrier_partner_id = fields.Many2one('res.partner', string='Transportadora')
modalidade_frete = fields.Selection(
[('0', '0 - Contratação do Frete por conta do Remetente (CIF)'),
('1', '1 - Contratação do Frete por conta do Destinatário (FOB)'),
('2', '2 - Contratação do Frete por conta de Terceiros'),
('3', '3 - Transporte Próprio por conta do Remetente'),
('4', '4 - Transporte Próprio por conta do Destinatário'),
('9', '9 - Sem Ocorrência de Transporte')],
string=u'Modalidade do frete', default="9")
quantidade_volumes = fields.Integer('Qtde. Volumes')
peso_bruto = fields.Float(string="Peso Bruto")

@api.model
def _autopost_draft_entries(self):
Expand Down
20 changes: 20 additions & 0 deletions l10n_br_eletronic_document/views/account_move.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,24 @@
</field>
</record>

<record id="view_move_form_l10n_br_carrier_form" model="ir.ui.view">
<field name="name">account.move.form.l10n.br.sale</field>
<field name="model">account.move</field>
<field name="inherit_id" ref="account.view_move_form"/>
<field name="arch" type="xml">
<xpath expr="//page[@id='aml_tab']" position='after'>
<page id="carrier_tab" string="Transportadora" groups="account.group_account_user">
<group id="carrier_tab_group">
<group string="Informações da Transportadora">
<field name="carrier_partner_id"/>
<field name="modalidade_frete"/>
<field name="quantidade_volumes"/>
<field name="peso_bruto"/>
</group>
</group>
</page>
</xpath>
</field>
</record>

</odoo>
1 change: 0 additions & 1 deletion l10n_br_sale/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
],
'data': [
'views/delivery_view.xml',
'views/account_move_views.xml',
'views/sale_order.xml',
'views/product_pricelist.xml',
'report/sale_report_templates.xml',
Expand Down
12 changes: 0 additions & 12 deletions l10n_br_sale/models/account_move.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,6 @@
class AccountMove(models.Model):
_inherit = 'account.move'

modalidade_frete = fields.Selection(
[('0', '0 - Contratação do Frete por conta do Remetente (CIF)'),
('1', '1 - Contratação do Frete por conta do Destinatário (FOB)'),
('2', '2 - Contratação do Frete por conta de Terceiros'),
('3', '3 - Transporte Próprio por conta do Remetente'),
('4', '4 - Transporte Próprio por conta do Destinatário'),
('9', '9 - Sem Ocorrência de Transporte')],
string=u'Modalidade do frete', default="9")
quantidade_volumes = fields.Integer('Qtde. Volumes')
# peso_liquido = fields.Float(string=u"Peso Líquido")
peso_bruto = fields.Float(string="Peso Bruto")

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

Expand Down
22 changes: 0 additions & 22 deletions l10n_br_sale/views/account_move_views.xml

This file was deleted.