mirror of
https://github.com/OCA/bank-payment.git
synced 2025-02-02 10:37:31 +02:00
[FIX] 11.0 Account Payment Order: domain bug on create line wizard
When `populate` method is called and the wizard action is returned again to refresh the view, the dynamic domain of `move_line_ids` gets lost. Updating move_line_ids field and returning `ir.actions.do_nothing` solves the issue.
This commit is contained in:
@@ -8,7 +8,7 @@
|
||||
|
||||
{
|
||||
'name': 'Account Payment Order',
|
||||
'version': '11.0.1.3.0',
|
||||
'version': '11.0.1.3.1',
|
||||
'license': 'AGPL-3',
|
||||
'author': "ACSONE SA/NV, "
|
||||
"Therp BV, "
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
# © 2016 Akretion (Alexis de Lattre <alexis.delattre@akretion.com>)
|
||||
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
|
||||
|
||||
from odoo import models, fields, api, _
|
||||
from odoo import api, fields, models, _
|
||||
from odoo.exceptions import UserError
|
||||
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
# © 2016 Akretion (Alexis de Lattre <alexis.delattre@akretion.com>)
|
||||
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
|
||||
|
||||
from odoo import models, fields
|
||||
from odoo import fields, models
|
||||
|
||||
|
||||
class AccountMove(models.Model):
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
|
||||
|
||||
from lxml import etree
|
||||
from odoo import models, fields, api
|
||||
from odoo import api, fields, models
|
||||
from odoo.osv import orm
|
||||
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
# © 2015-2016 Akretion - Alexis de Lattre <alexis.delattre@akretion.com>
|
||||
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
|
||||
|
||||
from odoo import models, fields, api, _
|
||||
from odoo import api, fields, models, _
|
||||
from odoo.exceptions import UserError
|
||||
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
# © 2016 Akretion (Alexis de Lattre <alexis.delattre@akretion.com>)
|
||||
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
|
||||
|
||||
from odoo import models, fields, api, _
|
||||
from odoo import api, fields, models, _
|
||||
from odoo.exceptions import ValidationError
|
||||
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
|
||||
|
||||
import base64
|
||||
from odoo import models, fields, api, _
|
||||
from odoo import api, fields, models, _
|
||||
from odoo.exceptions import UserError, ValidationError
|
||||
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
# © 2015-2016 Akretion - Alexis de Lattre <alexis.delattre@akretion.com>
|
||||
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
|
||||
|
||||
from odoo import models, fields, api, _
|
||||
from odoo import api, fields, models, _
|
||||
from odoo.exceptions import UserError
|
||||
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
# © 2015-2016 Akretion - Alexis de Lattre <alexis.delattre@akretion.com>
|
||||
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
|
||||
|
||||
from odoo import models, api, _
|
||||
from odoo import api, models, _
|
||||
from odoo.exceptions import ValidationError
|
||||
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
# © 2016 Akretion (<https://www.akretion.com>)
|
||||
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
|
||||
|
||||
from odoo import models, api
|
||||
from odoo import api, models
|
||||
|
||||
|
||||
class AccountInvoicePaymentLineMulti(models.TransientModel):
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
# © 2015-2016 Akretion (<https://www.akretion.com>)
|
||||
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
|
||||
|
||||
from odoo import models, fields, api, _
|
||||
from odoo import api, fields, models
|
||||
|
||||
|
||||
class AccountPaymentLineCreate(models.TransientModel):
|
||||
@@ -126,16 +126,9 @@ class AccountPaymentLineCreate(models.TransientModel):
|
||||
domain = self._prepare_move_line_domain()
|
||||
lines = self.env['account.move.line'].search(domain)
|
||||
self.move_line_ids = lines
|
||||
action = {
|
||||
'name': _('Select Move Lines to Create Transactions'),
|
||||
'type': 'ir.actions.act_window',
|
||||
'res_model': 'account.payment.line.create',
|
||||
'view_mode': 'form',
|
||||
'target': 'new',
|
||||
'res_id': self.id,
|
||||
'context': self._context,
|
||||
return {
|
||||
"type": "ir.actions.do_nothing",
|
||||
}
|
||||
return action
|
||||
|
||||
@api.onchange(
|
||||
'date_type', 'move_date', 'due_date', 'journal_ids', 'invoice',
|
||||
|
||||
Reference in New Issue
Block a user