Přejít na obsah
Odoo Menu
  • Přihlásit se
  • Vyzkoušejte zdarma
  • Aplikace
    Finance
    • Účetnictví
    • Fakturace
    • Výdaje
    • Spreadsheet (BI)
    • Dokumenty
    • Podpisy
    Prodej
    • CRM
    • Prodej
    • POS Obchod
    • POS Restaurace
    • Předplatné
    • Pronájem
    Webové stránky
    • Webové stránky
    • E-shop
    • Blog
    • Fórum
    • Živý chat
    • eLearning
    Dodavatelský řetězec
    • Sklad
    • Výroba
    • PLM
    • Nákup
    • Údržba
    • Kvalita
    Lidské zdroje
    • Zaměstnanci
    • Nábor
    • Volno
    • Hodnocení zaměstnanců
    • Doporučení
    • Vozový park
    Marketing
    • Marketing sociálních sítí
    • Emailový marketing
    • SMS Marketing
    • Události
    • Marketingová automatizace
    • Dotazníky
    Služby
    • Projekt
    • Časové výkazy
    • Práce v terénu
    • Helpdesk
    • Plánování
    • Schůzky
    Produktivita
    • Diskuze
    • Schvalování
    • IoT
    • VoIP
    • Znalosti
    • WhatsApp
    Aplikace třetích stran Odoo Studio Odoo cloudová platforma
  • Branže
    Maloobchod
    • Knihkupectví
    • Obchod s oblečením
    • Obchod s nábytkem
    • Potraviny
    • Obchod s hardwarem
    • Hračkářství
    Jídlo a pohostinství
    • Bar a Pub
    • Restaurace
    • Fast Food
    • Penzion
    • Distributor nápojů
    • Hotel
    Nemovitost
    • Realitní kancelář
    • Architektonická firma
    • Stavba
    • Správa nemovitostí
    • Zahradnictví
    • Asociace vlastníků nemovitosti
    Poradenství
    • Účetní firma
    • Odoo Partner
    • Marketingová agentura
    • Právník
    • Akvizice talentů
    • Audit a certifikace
    Výroba
    • Textil
    • Kov
    • Nábytek
    • Jídlo
    • Pivovar
    • Korporátní dárky
    Zdraví a fitness
    • Sportovní klub
    • Prodejna brýli
    • Fitness Centrum
    • Wellness praktikové
    • Lékárna
    • Kadeřnictví
    Transakce
    • Údržbář
    • Podpora IT & hardware
    • Systémy solární energie
    • Výrobce obuvi
    • Úklidové služby
    • Služby HVAC
    Ostatní
    • Nezisková organizace
    • Agentura pro životní prostředí
    • Pronájem billboardů
    • Fotografování
    • Leasing jízdních kol
    • Prodejce softwaru
    Procházet všechna odvětví
  • Komunita
    Edukační program
    • Tutoriály
    • Dokumentace
    • Certifikace
    • Vzdělávání
    • Blog
    • Podcast
    Podpora vzdělávání
    • Vzdělávací program
    • Scale Up! Hra na firmu
    • Navštivte Odoo
    Získat software
    • Stáhnout
    • Porovnejte edice
    • Verze
    Spolupráce
    • Github
    • Fórum
    • Události
    • Překlady
    • Stát se partnerem
    • Služby pro partnery
    • Registrujte svou účetní firmu
    Získat služby
    • Najít partnera
    • Najít účetní
    • Setkejte se s poradcem
    • Implementační služby
    • Zákaznické reference
    • Podpora
    • Upgrady
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Dohodnout demo
  • Ceník
  • Pomoc

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

  • CRM
  • e-Commerce
  • Účetnictví
  • Sklad
  • PoS
  • Projekty
  • MRP
All apps
You need to be registered to interact with the community.
All Posts Lidé Odznaky
Štítky (View all)
odoo accounting v14 pos v15
O tomto fóru
You need to be registered to interact with the community.
All Posts Lidé Odznaky
Štítky (View all)
odoo accounting v14 pos v15
O tomto fóru
Pomoc

RuntimeError: maximum recursion depth exceeded

Odebírat

Get notified when there's activity on this post

This question has been flagged
error
2 Odpovědi
31302 Zobrazení
Avatar
Atchuthan

Hi guyz, I'm getting this error: RuntimeError: maximum recursion depth exceeded. But the code was working fine before sometime.

When I searched regarding this issue, many results pointed to execution time taken due to python and also explanations were difficult to understand.

Can anyone give me suggestion regarding this error.

In sample.py:

from osv import fields, osv
import time

class sample(osv.osv):
    def onchange_state(self, cr, uid, ids, state_id, context=None):
        if state_id:
            country_id = self.pool.get('res.country.state').browse(cr, uid, state_id, context).country_id.id
            return {'value':{'country_id':country_id}}
        return {}   
    def _calculate(self, cr, uid, ids, fields, arg, context):
        x={}
        for record in self.browse(cr, uid, ids):
            x[record.id]= record.field_a + record.field_b
        return x
    _name = "sample"
    _table = "sample"
    _rec_name = "name"
    _log_access = True
    _description = "Simple Form"
    _columns = {
             'name':fields.char('Name', size=32, required=True),
             "age" : fields.integer("age"),
             "length": fields.integer("length"),    
             'address': fields.text('Address'),
             'flag': fields.boolean('Flag'),
             'date': fields.date('Date'),
             'datetime': fields.datetime('Date with Time'),
             'confirm': fields.selection((('unconfirmed', 'Unconfirmed'), ('confirmed', 'Confirmed')),
                  'Selection Box'),
             'image': fields.binary("Image"),
             "phone" : fields.char("phone"),

             'user_id': fields.many2one('res.users', 'Salesperson'),
             'partner_id': fields.many2one('res.partner', 'Customer', ondelete='cascade'),
             'location_id' : fields.related('location_id', type="many2one", relation="stock.location", string="Location Id"),
             'state_id': fields.many2one("res.country.state", 'State'),
             'country_id': fields.many2one('res.country', 'Country'),
             'country': fields.related('country_id', type='many2one', relation='res.country', string='Country'), 

             'duration' : fields.float('Duration'),

             'field_a' : fields.integer('Number1') ,
             'field_b' : fields.integer('Number2'),
             'result'  : fields.function(_calculate, type='integer', obj='sample', method=True, store=False, string='Result'),
    }

    _defaults = {  
        'date': fields.date.context_today,
        }

sample()

In sample_view.xml:

<?xml version="1.0" encoding="UTF-8"?>
<openerp>
    <data>

        <record model="ir.ui.view" id="test_tree_view">
            <field name="name">test.tree</field>
            <field name="model">sample</field>
            <field name="type">tree</field>
            <field name="arch" type="xml">
                <tree string="test" toolbar="1">
                    <field name="name" />
                    <field name="age" />
                    <field name="date" />
                </tree>
            </field>
        </record>

        <record model="ir.ui.view" id="test_form_view">
            <field name="name">test.form</field>
            <field name="model">sample</field>
            <field name="arch" type="xml">
                <form string="test" version="7.0">

                    <header>
                        <button name="header_button" string="Create" type="object" />
                        <field name="confirm" widget="statusbar" statusbar_visible="unconfirmed,coked"
                            statusbar_colors='{"unconfirmed":"red","confirmed":"blue"}'
                            clickable="True" />
                        <!-- <field name="name" widget="statusbar" statusbar_visible="draft,sent,invoiced,done" 
                            statusbar_colors='{"draft":"red","done":"blue"}' /> -->
                    </header>

                    <sheet>
                        <group>
                            <label string="Label" colspan="2" />
                            <field name="name" select="1" />
                            <field name="state_id" string="State" onchange="onchange_state" />
                            <field name="country_id" string="Country" />
                            <field name="country" />
                            <field name="location_id" /> 
                            <separator string="seperator tag inserted here"
                                colspan="4" />
                            <newline />
                            <notebook colspan="4" tabpos="up">
                                <page string="basic data field">
                                    <group>
                                        <field name="age" select="2" />
                                        <field name="length" select="3" />
                                        <field name="address" placeholder="Provide current address..." />
                                        <field name="flag" />
                                        <field name="date" />
                                        <field name="datetime" />
                                        <field name="confirm" />
                                        <field name="image" />
                                        <field name="state_id" />
                                        <field name="country_id" />
                                    </group>
                                </page>
                                <page string="relational data field">
                                    <group>
                                        <field name="user_id" string="user_id(many2one)" />
                                        <!-- <field name="partner_ids" string="partner_ids(one2many)" /> -->
                                    </group>
                                </page>
                                <page string="functional data field">
                                    <group>
                                        <field name="field_a" />
                                        <field name="field_b" />
                                        <field name="result" />
                                    </group>
                                </page>
                                <page string="calendar">
                                    <group>
                                        <field name="user_id" string="conducted by" />
                                        <field name="datetime" string="scheduled date" />
                                        <field name="duration" />
                                        <field name="partner_id" string="member to attend" />
                                    </group>
                                </page>
                            </notebook>
                        </group>

                        <!-- <button name="Submit" string="Button" icon="STOCK_APPLY" special="save" 
                            colspan="2" type="action" target="new" confirm="Ask for Confirmation" /> -->

                    </sheet>
                </form>
            </field>
        </record>

        <record model="ir.ui.view" id="sample_kanban_view">
            <field name="name">Kanban</field>
            <field name="model">sample</field>
            <field name="arch" type="xml">
                <kanban>
                    <field name="name" />
                    <!-- <field name="code" /> <field name="lst_price" /> -->
                    <templates>
                        <t t-name="kanban-box">
                            <div class="oe_kanban_vignette oe_semantic_html_override">
                                <a type="open">
                                    <img t-att-src="kanban_image('sample', 'image', record.id.value)"
                                        class="oe_kanban_image" />
                                </a>
                                <div class="oe_kanban_details">
                                    <h4>
                                        <a type="open">
                                            <!-- <t t-if="record.code.raw_value"> [ <field name="code" /> 
                                                ] </t> -->
                                            <field name="name" />
                                        </a>
                                    </h4>
                                    <div name="tags" />
                                    <ul>
                                        <li>
                                            Age:
                                            <field name="age"></field>
                                        </li>
                                    </ul>
                                </div>
                            </div>
                        </t>
                    </templates>
                </kanban>
            </field>
        </record>

        <record model="ir.ui.view" id="sample_graph">
            <field name="name">sample.graph</field>
            <field name="model">sample</field>
            <field name="type">graph</field>
            <field name="arch" type="xml">
                <graph string="Graph string" orientation="horizontal" type="bar">
                    <field name="name" group="True" />
                    <field name="age" operator="*" />
                </graph>
            </field>
        </record>

        <record model="ir.ui.view" id="sample_calendar_view">
            <field name="name">sample.calendar</field>
            <field name="model">sample</field>
            <field name="type">calendar</field>
            <field name="arch" type="xml">
                <calendar string="Reminders" date_start="datetime" color="user_id"
                    date_delay="duration" mode="week">
                    <field name="name" modifiers="{'required': true}" />
                    <field name="partner_id" modifiers="{}" />
                </calendar>
            </field>
        </record>

        <record model="ir.ui.view" id="sample_search_view">
            <field name="name">sample.search</field>
            <field name="model">sample</field>
            <field name="type">search</field>
            <field name="arch" type="xml">
                <search>
                    <group expand="1" string="Group By...">
                        <filter string="Users" icon="terp-project" domain="[]"
                            context="{'group_by':'user_id'}" />
                        <filter string="Partner" icon="terp-project" domain="[]"
                            context="{'group_by':'partner_id'}"  />
                        <separator orientation="vertical" />
                        <filter string="Date" icon="terp-project" domain="[]"
                            context="{'group_by':'date'}" />
                        <filter string="Current State" domain="[('confirm','in',('unconfirmed','confirmed'))]" help="Confirmed and Unconfirmed Tasks" icon="terp-project"/>
                        <field name="location_id" string="Location"
                            filter_domain="['|',('location_id','ilike',self),('location_dest_id','ilike',self)]" />
                    </group>
                </search>
            </field>
        </record>

        <record model="ir.ui.view" id="sample_gantt_view">
            <field name="name">sample.gantt</field>
            <field name="model">sample</field>
            <field name="type">gantt</field>
            <field name="arch" type="xml">
                <gantt color="user_id" date_delay="duration" date_start="datetime"
                    string="Tasks" mode="3months">
                    <level object="crm.make.sale" link="partnet_id" domain="[]">
                        <field name="name" />
                    </level>
                </gantt>
            </field>
        </record>

        <record model="ir.actions.act_window" id="action_test_form">
            <field name="name">sample</field>
            <field name="res_model">sample</field>
            <field name="view_type">form</field>
            <field name="view_mode">kanban,tree,form,graph,calendar,gantt</field>
        </record>

        <menuitem name="testParent" icon="terp-project" id="testParent_menu"
            sequence="0" />

        <menuitem name="NotesChild" parent="testParent_menu" id="NotesChild_menu" />

        <menuitem name="Header" parent="NotesChild_menu" id="Header_menu_mainform"
            action="action_test_form" />
    </data>

</openerp>

__openerp__.py:

#coomentnds
{
    "name" : "sample",
    "version" : "0.1",
    "author" : "Atchuthan",
    "category" : "Generic Modules/Others",
    "depends" : ["base", "stock"],
    "description" : "Simple demo form",
    "demo_xml" : [],
    "data" : ["sample_view.xml"],
    "active": False,
    "installable": True
}
0
Avatar
Zrušit
Gustavo

what is the name of the module you were working with? were you working with partners, categories, or bill of materials?

Atchuthan
Autor

i created a custom module

Gustavo

could you post it? looks like there is a bug in your module

Atchuthan
Autor

code added

Gustavo

the code looks OK, could you post the traceback?

Atchuthan
Autor

traceback updated

Atchuthan
Autor

This code is working properly fine now... So why was there a error?

No code changes done.

Avatar
Christian Twinckle
Nejlepší odpověď

https://answers.launchpad.net/openobject-addons/+question/179149

check this answer.may be this answer will help you.

Thank you.

0
Avatar
Zrušit
Atchuthan
Autor

I already viewed this link with OpenERP bug issues @ https://bugs.launchpad.net/openobject-addons/+bug/891474.

They are telling it as "configuration mistake" but why is it working fine now?..

I didnt change any code to remove error. Today when I tried to open my custom module, it worked fine.

Avatar
Sudhir Arya (ERP Harbor Consulting Services)
Nejlepší odpověď

It seems problem is in following line:

for picking, todo in self._chain_compute(cr, uid, moves, context=context).items():
0
Avatar
Zrušit
Enjoying the discussion? Don't just read, join in!

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

Přihlásit se
Related Posts Odpovědi Zobrazení Aktivita
?"Your country might be blocked by our hosting provider" error when I create new website
error
Avatar
0
lis 25
592
Payment Page Return Error with Razorpay on Mobile Devices
error
Avatar
0
zář 25
1278
Error after installing "purchase" app in Odoo version 18
error
Avatar
Avatar
1
pro 24
7088
error schema for TourStep Error
error
Avatar
0
lis 24
2646
Can't modify manifest version of custom module [Odoo.sh]
error
Avatar
Avatar
Avatar
2
čvc 24
5415
Komunita
  • Tutoriály
  • Dokumentace
  • Fórum
Open Source
  • Stáhnout
  • Github
  • Runbot
  • Překlady
Služby
  • Odoo.sh hostování
  • Podpora
  • Upgrade
  • Nestandardní vývoj
  • Edukační program
  • Najít účetní
  • Najít partnera
  • Stát se partnerem
O nás
  • Naše společnost
  • Podklady značky
  • Kontakujte nás
  • Práce
  • Události
  • Podcast
  • Blog
  • Zákazníci
  • Právní dokumenty • Soukromí
  • Zabezpečení
الْعَرَبيّة 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 je balíček open-source aplikací, které pokrývají všechny potřeby vaší společnosti: CRM, e-shop, účetnictví, sklady, kasy, projektové řízení a další.

Unikátní nabídka od Odoo poskytuje velmi jednoduché uživatelské rozhraní a vše je integrované na jednom místě.

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