Přejít na obsah
Menu
You need to be registered to interact with the community.
This question has been flagged
1 Odpovědět
1419 Zobrazení

I am trying to upgrade a custom module from odoo 13 to 14 , while installing it , this error is showing up : 
AssertionError: account.payment.payment_difference_handling: selection_add=[('reconcile_multi_deduct', 'Mark invoice as fully paid (multi deduct)')] on non-list selection None

Avatar
Zrušit
Nejlepší odpověď

Hi,

In Odoo 13, the field payment_difference_handling is defined within the account.payment model, but while coming to Odoo 14, it is defined in the account.payment.register model.
So you have to change the model in which you are inheriting the field and adding new values into the selection list.


class AccountPaymentRegister(models.TransientModel):
_inherit = 'account.payment.register'
payment_difference_handling = usage = fields.Selection(selection_add=[('reconcile_multi_deduct', 'Mark invoice as fully paid (multi deduct)')],ondelete={'reconcile_multi_deduct': 'cascade'})

Hope it helps

Avatar
Zrušit
Related Posts Odpovědi Zobrazení Aktivita
3
zář 25
3311
0
srp 25
843
1
srp 25
3067
2
čvc 25
8710
2
čvc 25
5073