Skip to content

Commit

Permalink
[FIX] l10n_br_stock_account: The Partner used for Invoice should be t…
Browse files Browse the repository at this point in the history
…he mapped by the method _get_partner_to_invoice.
  • Loading branch information
mbcosta committed Apr 18, 2024
1 parent 7e50f6f commit 98c4b3d
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions l10n_br_stock_account/wizards/stock_invoice_onshipping.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,11 @@ def _build_invoice_values_from_pickings(self, pickings):
# 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
Expand Down

0 comments on commit 98c4b3d

Please sign in to comment.