OCA / l10n-switzerland

Odoo Swiss localization
GNU Affero General Public License v3.0
53 stars 163 forks source link

[14.0][FIX] l10n_ch_base_bank tests #609

Closed SimoneVagile closed 3 years ago

OCA-git-bot commented 3 years ago

This PR has the approved label and has been created more than 5 days ago. It should therefore be ready to merge by a maintainer (or a PSC member if the concerned addon has no declared maintainer). 🤖

SimoRubi commented 3 years ago

@OCA/local-switzerland-maintainers can this be merged? Thanks!

TDu commented 3 years ago

This one can be closed as https://github.com/OCA/l10n-switzerland/pull/616 has been merged and the 14 branch is green now @yvaucher

yvaucher commented 3 years ago

Thus closing it

yvaucher commented 3 years ago

@SimoneVagile thanks for the fix. Hope the other one is fine by you.

SimoneVagile commented 2 years ago

@SimoneVagile thanks for the fix. Hope the other one is fine by you.

I still have an error in Travis, see https://github.com/OCA/l10n-switzerland/pull/591

Traceback (most recent call last):

File "/home/travis/build/OCA/l10n-switzerland/setup/l10n_ch_base_bank/odoo/addons/l10n_ch_base_bank/tests/test_create_invoice.py", line 55, in test_emit_move_with_isr_ref

inv_form.save()

File "/home/travis/odoo-14.0/odoo/tests/common.py", line 1892, in save

r.write(values)

File "/home/travis/odoo-14.0/addons/account/models/account_move.py", line 2015, in write

res = super(AccountMove, self.with_context(check_move_validity=False, skip_account_move_synchronization=True)).write(vals)

File "/home/travis/odoo-14.0/addons/mail/models/mail_thread.py", line 316, in write

return super(MailThread, self).write(values)

File "/home/travis/odoo-14.0/addons/mail/models/mail_activity.py", line 788, in write

return super(MailActivityMixin, self).write(vals)

File "/home/travis/odoo-14.0/odoo/models.py", line 3693, in write

real_recs._validate_fields(vals, inverse_fields)

File "/home/travis/odoo-14.0/odoo/models.py", line 1266, in _validate_fields

check(self)

File "/home/travis/build/OCA/l10n-switzerland/setup/l10n_ch_base_bank/odoo/addons/l10n_ch_base_bank/models/invoice.py", line 83, in _check_bank_type_for_type_isr

"Bank account shouldn't be empty, for ISR ref"

odoo.exceptions.ValidationError: Bank account shouldn't be empty, for ISR ref type, you can set it manually or set appropriate payment mode.

Can you re-open this?