Skip to Content
Odoo Menu
  • Prijavi
  • Try it free
  • Aplikacije
    Finance
    • Knjigovodstvo
    • Obračun
    • Stroški
    • Spreadsheet (BI)
    • Dokumenti
    • Podpisovanje
    Prodaja
    • CRM
    • Prodaja
    • POS Shop
    • POS Restaurant
    • Naročnine
    • Najem
    Spletne strani
    • Website Builder
    • Spletna trgovina
    • Blog
    • Forum
    • Pogovor v živo
    • eUčenje
    Dobavna veriga
    • Zaloga
    • Proizvodnja
    • PLM
    • Nabava
    • Vzdrževanje
    • Kakovost
    Kadri
    • Kadri
    • Kadrovanje
    • Odsotnost
    • Ocenjevanja
    • Priporočila
    • Vozni park
    Marketing
    • Družbeno Trženje
    • Email Marketing
    • SMS Marketing
    • Dogodki
    • Avtomatizacija trženja
    • Ankete
    Storitve
    • Projekt
    • Časovnice
    • Storitve na terenu
    • Služba za pomoč
    • Načrtovanje
    • Termini
    Produktivnost
    • Razprave
    • Odobritve
    • IoT
    • Voip
    • Znanje
    • WhatsApp
    Third party apps Odoo Studio Odoo Cloud Platform
  • Industrije
    Trgovina na drobno
    • Book Store
    • Trgovina z oblačili
    • Trgovina s pohištvom
    • Grocery Store
    • Trgovina s strojno opremo računalnikov
    • Trgovina z igračami
    Food & Hospitality
    • Bar and Pub
    • Restavracija
    • Hitra hrana
    • Guest House
    • Beverage Distributor
    • Hotel
    Nepremičnine
    • Real Estate Agency
    • Arhitekturno podjetje
    • Gradbeništvo
    • Estate Management
    • Vrtnarjenje
    • Združenje lastnikov nepremičnin
    Svetovanje
    • Računovodsko podjetje
    • Odoo Partner
    • Marketinška agencija
    • Law firm
    • Pridobivanje talentov
    • Audit & Certification
    Proizvodnja
    • Tekstil
    • Metal
    • Pohištvo
    • Hrana
    • Brewery
    • Poslovna darila
    Health & Fitness
    • Športni klub
    • Trgovina z očali
    • Fitnes center
    • Wellness Practitioners
    • Lekarna
    • Frizerski salon
    Trades
    • Handyman
    • IT Hardware & Support
    • Sistemi sončne energije
    • Izdelovalec čevljev
    • Čistilne storitve
    • HVAC Services
    Ostali
    • Neprofitna organizacija
    • Agencija za okolje
    • Najem oglasnih panojev
    • Fotografija
    • Najem koles
    • Prodajalec programske opreme
    Browse all Industries
  • Skupnost
    Learn
    • Tutorials
    • Dokumentacija
    • Certifikati
    • Šolanje
    • Blog
    • Podcast
    Empower Education
    • Education Program
    • Scale Up! Business Game
    • Visit Odoo
    Get the Software
    • Prenesi
    • Compare Editions
    • Releases
    Collaborate
    • Github
    • Forum
    • Dogodki
    • Prevodi
    • Become a Partner
    • Services for Partners
    • Register your Accounting Firm
    Get Services
    • Find a Partner
    • Find an Accountant
    • Meet an advisor
    • Implementation Services
    • Sklici kupca
    • Podpora
    • Upgrades
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Get a demo
  • Določanje cen
  • Pomoč

Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:

  • CRM
  • e-Commerce
  • Knjigovodstvo
  • Zaloga
  • PoS
  • Projekt
  • MRP
All apps
You need to be registered to interact with the community.
All Posts People Badges
Ključne besede (View all)
odoo accounting v14 pos v15
About this forum
You need to be registered to interact with the community.
All Posts People Badges
Ključne besede (View all)
odoo accounting v14 pos v15
About this forum
Pomoč

_is_payment_method_available attribute

Naroči se

Get notified when there's activity on this post

This question has been flagged
account.journal
1 Odgovori
2841 Prikazi
Avatar
Roger

Hi;

In the Enterprise module of Odoo 15 account.journal, when assigning a journal I get an error that account.journal does not have the _is_payment_method_available attribute.

def _default_inbound_payment_methods(self):
res = super()._default_inbound_payment_methods()
if self._is_payment_method_available('batch_payment'):
res |= self.env.ref ('account_batch_payment.account_payment_method_batch_deposit')
return res


Traceback (most recent call last):
  File "/odoo/odoo-server/odoo/addons/base/models/ir_http.py", line 237, in _dispatch
    result = request.dispatch()
  File "/odoo/odoo-server/odoo/http.py", line 688, in dispatch
    result = self._call_function(**self.params)
  File "/odoo/odoo-server/odoo/http.py", line 360, in _call_function
    return checked_call(self.db, *args, **kwargs)
  File "/odoo/odoo-server/odoo/service/model.py", line 94, in wrapper
    return f(dbname, *args, **kwargs)
  File "/odoo/odoo-server/odoo/http.py", line 349, in checked_call
    result = self.endpoint(*a, **kw)
  File "/odoo/odoo-server/odoo/http.py", line 917, in __call__
    return self.method(*args, **kw)
  File "/odoo/odoo-server/odoo/http.py", line 536, in response_wrap
    response = f(*args, **kw)
  File "/odoo/odoo-server/addons/web/controllers/main.py", line 1352, in call_button
    action = self._call_kw(model, method, args, kwargs)
  File "/odoo/odoo-server/addons/web/controllers/main.py", line 1340, in _call_kw
    return call_kw(request.env[model], method, args, kwargs)
  File "/odoo/odoo-server/odoo/api.py", line 464, in call_kw
    result = _call_kw_multi(method, model, args, kwargs)
  File "/odoo/odoo-server/odoo/api.py", line 451, in _call_kw_multi
    result = method(recs, *args, **kwargs)
  File "/odoo/odoo-server/odoo/addons/base/models/res_config.py", line 622, in execute
    self.set_values()
  File "/odoo/odoo-server/addons/website_sale_stock/models/res_config_settings.py", line 17, in set_values
    super(ResConfigSettings, self).set_values()
  File "/odoo/odoo-server/addons/sale_management/models/res_config_settings.py", line 28, in set_values
    return super(ResConfigSettings, self).set_values()
  File "/odoo/odoo-server/addons/sale/models/res_config_settings.py", line 75, in set_values
    super(ResConfigSettings, self).set_values()
  File "/odoo/odoo-server/addons/crm_iap_enrich/models/res_config_settings.py", line 18, in set_values
    super(ResConfigSettings, self).set_values()
  File "/odoo/odoo-server/addons/purchase/models/res_config_settings.py", line 42, in set_values
    super(ResConfigSettings, self).set_values()
  File "/odoo/odoo-server/addons/hr_expense/models/res_config_settings.py", line 27, in set_values
    super(ResConfigSettings, self).set_values()
  File "/odoo/odoo-server/addons/website/models/res_config_settings.py", line 144, in set_values
    super(ResConfigSettings, self).set_values()
  File "/odoo/odoo-server/addons/stock/models/res_config_settings.py", line 90, in set_values
    res = super(ResConfigSettings, self).set_values()
  File "/odoo/odoo-server/addons/mass_mailing/models/res_config_settings.py", line 24, in set_values
    super().set_values()
  File "/odoo/odoo-server/addons/crm/models/res_config_settings.py", line 134, in set_values
    super(ResConfigSettings, self).set_values()
  File "/odoo/odoo-server/addons/account/models/res_config_settings.py", line 150, in set_values
    self.chart_template_id._load(15.0, 15.0, self.env.company)
  File "/odoo/odoo-server/enterprise/account_followup/models/chart_template.py", line 10, in _load
    res = super(AccountChartTemplate, self)._load(sale_tax_rate, purchase_tax_rate, company)
  File "/odoo/odoo-server/enterprise/account_reports/models/chart_template.py", line 9, in _load
    res = super(AccountChartTemplate, self)._load(sale_tax_rate, purchase_tax_rate, company)
  File "/odoo/odoo-server/addons/account/models/chart_template.py", line 331, in _load
    self._create_bank_journals(company, acc_template_ref)
  File "/odoo/odoo-server/addons/account/models/chart_template.py", line 408, in _create_bank_journals
    bank_journals += self.env['account.journal'].create({
  File "/usr/local/lib/python3.8/dist-packages/decorator.py", line 232, in fun
    return caller(func, *(extras + args), **kw)
  File "/odoo/odoo-server/odoo/api.py", line 391, in _model_create_single
    return create(self, arg)
  File "/odoo/odoo-server/addons/account/models/account_journal.py", line 661, in create
    journal = super(AccountJournal, self.with_context(mail_create_nolog=True)).create(vals)
  File "/usr/local/lib/python3.8/dist-packages/decorator.py", line 232, in fun
    return caller(func, *(extras + args), **kw)
  File "/odoo/odoo-server/odoo/api.py", line 412, in _model_create_multi
    return create(self, [arg])
  File "/odoo/odoo-server/addons/mail/models/mail_thread.py", line 265, in create
    threads = super(MailThread, self).create(vals_list)
  File "/usr/local/lib/python3.8/dist-packages/decorator.py", line 232, in fun
    return caller(func, *(extras + args), **kw)
  File "/odoo/odoo-server/odoo/api.py", line 413, in _model_create_multi
    return create(self, arg)
  File "/odoo/odoo-server/odoo/addons/base/models/ir_fields.py", line 613, in create
    recs = super().create(vals_list)
  File "/usr/local/lib/python3.8/dist-packages/decorator.py", line 232, in fun
    return caller(func, *(extras + args), **kw)
  File "/odoo/odoo-server/odoo/api.py", line 413, in _model_create_multi
    return create(self, arg)
  File "/odoo/odoo-server/odoo/models.py", line 4110, in create
    records._check_company()
  File "/odoo/odoo-server/odoo/models.py", line 3493, in _check_company
    corecord = record.sudo()[name]
  File "/odoo/odoo-server/odoo/models.py", line 5885, in __getitem__
    return self._fields[key].__get__(self, type(self))
  File "/odoo/odoo-server/odoo/fields.py", line 3389, in __get__
    return super().__get__(records, owner)
  File "/odoo/odoo-server/odoo/fields.py", line 2603, in __get__
    return super().__get__(records, owner)
  File "/odoo/odoo-server/odoo/fields.py", line 1054, in __get__
    self.recompute(record)
  File "/odoo/odoo-server/odoo/fields.py", line 1243, in recompute
    self.compute_value(recs)
  File "/odoo/odoo-server/odoo/fields.py", line 1265, in compute_value
    records._compute_field_value(self)
  File "/odoo/odoo-server/addons/mail/models/mail_thread.py", line 411, in _compute_field_value
    return super()._compute_field_value(field)
  File "/odoo/odoo-server/odoo/models.py", line 4255, in _compute_field_value
    getattr(self, field.compute)()
  File "/odoo/odoo-server/addons/account/models/account_journal.py", line 287, in _compute_inbound_payment_method_line_ids
    default_methods = journal._default_inbound_payment_methods()
  File "/odoo/odoo-server/enterprise/account_sepa_direct_debit/models/account_journal.py", line 12, in _default_inbound_payment_methods
    res = super()._default_inbound_payment_methods()
  File "/odoo/odoo-server/enterprise/account_batch_payment/models/account_journal.py", line 12, in _default_inbound_payment_methods
    if self._is_payment_method_available('batch_payment'):
Exception

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/odoo/odoo-server/odoo/http.py", line 644, in _handle_exception
    return super(JsonRequest, self)._handle_exception(exception)
  File "/odoo/odoo-server/odoo/http.py", line 302, in _handle_exception
    raise exception.with_traceback(None) from new_cause
AttributeError: 'account.journal' object has no attribute '_is_payment_method_available'

Reviewing I have seen that this method is not defined anywhere. The question is; Does anyone have it defined or has encountered this problem before?

Thank you anyway

0
Avatar
Opusti
Avatar
Roger
Avtor Best Answer

Solucionado con la creación de un modulo donde añade la parte de la definición de la función.


https://github.com/odoo/odoo/blob/89ecb17f56b34b7e3875fa36cde70a2666dca4d8/addons/account/models/account_journal.py

0
Avatar
Opusti
Enjoying the discussion? Don't just read, join in!

Create an account today to enjoy exclusive features and engage with our awesome community!

Prijavi
Related Posts Odgovori Prikazi Aktivnost
Odoo V14 Reports/Qweb
account.journal
Avatar
0
jun. 21
3523
Manufacturing Accounting
manufacturing account.journal
Avatar
0
apr. 17
4767
customize the daily sales and purchase journal.
account.journal odooV8
Avatar
0
feb. 16
4060
Doubled balances after closing a Fiscal Year Solved
account.journal fiscal_year
Avatar
Avatar
2
jul. 15
5409
Missing default account field on create journal
account.journal Journal Defaults
Avatar
Avatar
1
mar. 23
3350
Community
  • Tutorials
  • Dokumentacija
  • Forum
Open Source
  • Prenesi
  • Github
  • Runbot
  • Prevodi
Services
  • Odoo.sh Hosting
  • Podpora
  • Nadgradnja
  • Custom Developments
  • Izobraževanje
  • Find an Accountant
  • Find a Partner
  • Become a Partner
About us
  • Our company
  • Sredstva blagovne znamke
  • Kontakt
  • Zaposlitve
  • Dogodki
  • Podcast
  • Blog
  • Stranke
  • Pravno • Zasebnost
  • Varnost
الْعَرَبيّة Català 简体中文 繁體中文 (台灣) Čeština Dansk Nederlands English Suomi Français Deutsch हिंदी Bahasa Indonesia Italiano 日本語 한국어 (KR) Lietuvių kalba Język polski Português (BR) română русский язык Slovenský jazyk slovenščina Español (América Latina) Español ภาษาไทย Türkçe українська Tiếng Việt

Odoo is a suite of open source business apps that cover all your company needs: CRM, eCommerce, accounting, inventory, point of sale, project management, etc.

Odoo's unique value proposition is to be at the same time very easy to use and fully integrated.

Website made with

Odoo Experience on YouTube

1. Use the live chat to ask your questions.
2. The operator answers within a few minutes.

Live support on Youtube
Watch now