[FIX] account_edi: disable prediction when importing invoices.
closes odoo/odoo#69177 X-original-commit: 1502612c5d7f7516091e7e9dd2dba47cb0fccf25 Related: odoo/enterprise#17605 Signed-off-by: William André (wan) <wan@odoo.com>
This commit is contained in:
@@ -136,7 +136,8 @@ class AccountEdiFormat(models.Model):
|
||||
invoice.move_type = default_move_type
|
||||
|
||||
# self could be a single record (editing) or be empty (new).
|
||||
with Form(invoice.with_context(default_move_type=default_move_type)) as invoice_form:
|
||||
with Form(invoice.with_context(default_move_type=default_move_type,
|
||||
account_predictive_bills_disable_prediction=True)) as invoice_form:
|
||||
partner_type = invoice_form.journal_id.type == 'purchase' and 'SellerTradeParty' or 'BuyerTradeParty'
|
||||
invoice_form.partner_id = self._retrieve_partner(
|
||||
name=_find_value('//ram:' + partner_type + '/ram:Name'),
|
||||
|
||||
@@ -152,7 +152,8 @@ class AccountEdiFormat(models.Model):
|
||||
elif elements and elements[0].text and elements[0].text == 'TD04':
|
||||
move_type = 'in_refund'
|
||||
# move could be a single record (editing) or be empty (new).
|
||||
with Form(invoice.with_context(default_move_type=move_type)) as invoice_form:
|
||||
with Form(invoice.with_context(default_move_type=move_type,
|
||||
account_predictive_bills_disable_prediction=True)) as invoice_form:
|
||||
message_to_log = []
|
||||
|
||||
# Partner (first step to avoid warning 'Warning! You must first select a partner.'). <1.2>
|
||||
|
||||
Reference in New Issue
Block a user