Skip to content

Commit

Permalink
[14.0][FIX] l10n_ch_base_bank
Browse files Browse the repository at this point in the history
This is a forward port of

* OCA#603

On an unrelated PR the test for l10n_ch_base_bank were broken.
It seems to be related to this new change introduced by

* odoo/odoo#67599

Which test the valid of the type journal.

So this fixes the test, but I am not sure if they are still meaningfull.
  • Loading branch information
TDu authored and sonhd committed Oct 5, 2021
1 parent 6c40ed9 commit 9176223
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 15 deletions.
23 changes: 14 additions & 9 deletions l10n_ch_base_bank/tests/test_create_invoice.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,20 +14,25 @@ def setUpClass(cls):
bank = cls.env["res.bank"].create(
{"name": "BCV", "bic": "BBRUBEBB", "clearing": "234234"}
)
# define company bank account
cls.bank_journal = cls.env["account.journal"].create(
cls.env["res.partner.bank"].create(
{
"partner_id": cls.company.partner_id.id,
"bank_id": bank.id,
"acc_number": "ISR",
"l10n_ch_isr_subscription_chf": "01-162-8",
"sequence": 1,
}
)
cls.journal = cls.env["account.journal"].create(
{
"name": "Test Sale Journal",
"company_id": cls.company.id,
"type": "bank",
"code": "BNK42",
"type": "sale",
"code": "SALE123",
"bank_id": bank.id,
"bank_acc_number": "01-1234-1",
}
)
cls.bank_acc = cls.bank_journal.bank_account_id
cls.bank_acc.write({"l10n_ch_isr_subscription_chf": "01-162-8", "sequence": 1})
fields_list = ["company_id", "user_id", "currency_id", "journal_id"]
cls.inv_values = cls.env["account.move"].default_get(fields_list)

def new_form(self):
inv = Form(
Expand All @@ -38,7 +43,7 @@ def new_form(self):
# view='account.view_move_form'
# )
inv.partner_id = self.partner
inv.journal_id = self.bank_journal
inv.journal_id = self.journal
return inv

def test_emit_move_with_isr_ref(self):
Expand Down
11 changes: 6 additions & 5 deletions l10n_ch_base_bank/tests/test_search_invoice.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ def setUpClass(cls):
super().setUpClass()
cls.env = cls.env(context=dict(cls.env.context, tracking_disable=True))
cls.company = cls.env.ref("base.main_company")
cls.partner = cls.env.ref("base.res_partner_12")
bank = cls.env["res.bank"].create(
{"name": "BCV", "bic": "BBRUBEBB", "clearing": "234234"}
)
Expand All @@ -24,12 +25,12 @@ def setUpClass(cls):
"sequence": 1,
}
)
cls.partner = cls.env["res.partner"].create({"name": "Test"})
cls.bank_journal = cls.env["account.journal"].create(
cls.journal = cls.env["account.journal"].create(
{
"name": "Test Journal",
"company_id": cls.company.id,
"type": "bank",
"code": "BNK42",
"type": "sale",
"code": "SALE123",
"bank_id": bank.id,
"bank_acc_number": "10-8060-7",
}
Expand All @@ -42,7 +43,7 @@ def new_form(self):
# view='account.view_move_form'
# )
inv.partner_id = self.partner
inv.journal_id = self.bank_journal
inv.journal_id = self.journal
return inv

def assert_find_ref(self, ref, operator, value):
Expand Down
17 changes: 16 additions & 1 deletion l10n_ch_states/i18n/l10n_ch_states.pot
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 13.0\n"
"Project-Id-Version: Odoo Server 14.0\n"
"Report-Msgid-Bugs-To: \n"
"Last-Translator: \n"
"Language-Team: \n"
Expand Down Expand Up @@ -54,6 +54,11 @@ msgstr ""
msgid "Country state"
msgstr ""

#. module: l10n_ch_states
#: model:ir.model.fields,field_description:l10n_ch_states.field_res_country_state__display_name
msgid "Display Name"
msgstr ""

#. module: l10n_ch_states
#: model:res.country.state,name:l10n_ch_states.state_FR
msgid "Fribourg"
Expand All @@ -79,6 +84,11 @@ msgstr ""
msgid "Grisons"
msgstr ""

#. module: l10n_ch_states
#: model:ir.model.fields,field_description:l10n_ch_states.field_res_country_state__id
msgid "ID"
msgstr ""

#. module: l10n_ch_states
#: model:res.country.state,name:l10n_ch_states.state_IT
msgid "Italy"
Expand All @@ -89,6 +99,11 @@ msgstr ""
msgid "Jura"
msgstr ""

#. module: l10n_ch_states
#: model:ir.model.fields,field_description:l10n_ch_states.field_res_country_state____last_update
msgid "Last Modified on"
msgstr ""

#. module: l10n_ch_states
#: model:res.country.state,name:l10n_ch_states.state_LU
msgid "Luzern"
Expand Down

0 comments on commit 9176223

Please sign in to comment.