Skip to content

Commit

Permalink
Merge PR OCA#2730 into 14.0
Browse files Browse the repository at this point in the history
Signed-off-by tafaRU
  • Loading branch information
OCA-git-bot committed Mar 29, 2022
2 parents f68128e + f381c87 commit 41c278c
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py
Original file line number Diff line number Diff line change
Expand Up @@ -1035,6 +1035,14 @@ def invoiceCreate(self, fatt, fatturapa_attachment, FatturaBody, partner_id):
FatturaBody.DatiGenerali.DatiGeneraliDocumento.Data, "%Y-%m-%d"
).date()

delivery_partner_id = partner.address_get(["delivery"])["delivery"]
fiscal_position_id = (
self.env["account.fiscal.position"].get_fiscal_position(
partner_id, delivery_id=delivery_partner_id
)
or False
)

invoice_data = {
"e_invoice_received_date": e_invoice_received_date,
"date": e_invoice_received_date
Expand All @@ -1047,7 +1055,7 @@ def invoiceCreate(self, fatt, fatturapa_attachment, FatturaBody, partner_id):
"currency_id": currency[0].id,
"journal_id": purchase_journal.id,
# 'origin': xmlData.datiOrdineAcquisto,
"fiscal_position_id": (partner.property_account_position_id.id or False),
"fiscal_position_id": fiscal_position_id,
"invoice_payment_term_id": partner.property_supplier_payment_term_id.id,
"company_id": company.id,
"fatturapa_attachment_in_id": fatturapa_attachment.id,
Expand Down

0 comments on commit 41c278c

Please sign in to comment.