Skip to content

Commit

Permalink
[REF] l10n_br_stock_account: Create Invoice with Partner Shipping inf…
Browse files Browse the repository at this point in the history
…ormed even when it's equal to Partner.
  • Loading branch information
mbcosta committed Mar 28, 2024
1 parent 6c2e69c commit 8b00d4c
Showing 1 changed file with 0 additions and 10 deletions.
10 changes: 0 additions & 10 deletions l10n_br_stock_account/wizards/stock_invoice_onshipping.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,22 +90,12 @@ def _build_invoice_values_from_pickings(self, pickings):
if picking.fiscal_operation_id and picking.fiscal_operation_id.journal_id:
fiscal_vals["journal_id"] = picking.fiscal_operation_id.journal_id.id

# Endereço de Entrega diferente do Endereço de Faturamento
# so informado quando é diferente
if fiscal_vals["partner_id"] != values["partner_id"]:
values["partner_shipping_id"] = fiscal_vals["partner_id"]
# Partner a ser usado deve ser o que é mapeado pelo metodo
# _get_partner_to_invoice sem isso o caso do Pedido de Vendas
# que tem um partner_shipping_id diferente do partner_invoice_id
# falha, o teste pode ser visto no modulo l10n_br_sale_stock
del fiscal_vals["partner_id"]
else:
# Já no modulo stock_picking_invoicing o campo partner_shipping_id
# é informado mas para evitar ter a NFe com o Endereço de Entrega
# quando esse é o mesmo Endereço, esta sendo removido.
# TODO: Deveria ser informado mesmo quando é o mesmo? Isso não
# acontecia na v12.
del values["partner_shipping_id"]

# Ser for feito o update como abaixo o campo
# fiscal_operation_id vai vazio
Expand Down

0 comments on commit 8b00d4c

Please sign in to comment.