Skip to Content
Odoo Menu
  • Prihlásiť sa
  • Vyskúšajte zadarmo
  • Aplikácie
    Financie
    • Účtovníctvo
    • Fakturácia
    • Výdavky
    • Tabuľka (BI)
    • Dokumenty
    • Podpis
    Predaj
    • CRM
    • Predaj
    • POS Shop
    • POS Restaurant
    • Manažment odberu
    • Požičovňa
    Webstránky
    • Tvorca webstránok
    • eShop
    • Blog
    • Fórum
    • Živý chat
    • eLearning
    Supply Chain
    • Sklad
    • Výroba
    • Správa životného cyklu produktu
    • Nákup
    • Údržba
    • Manažment kvality
    Ľudské zdroje
    • Zamestnanci
    • Nábor zamestnancov
    • Voľné dni
    • Hodnotenia
    • Odporúčania
    • Vozový park
    Marketing
    • Marketing sociálnych sietí
    • Email marketing
    • SMS marketing
    • Eventy
    • Marketingová automatizácia
    • Prieskumy
    Služby
    • Projektové riadenie
    • Pracovné výkazy
    • Práca v teréne
    • Helpdesk
    • Plánovanie
    • Schôdzky
    Produktivita
    • Tímová komunikácia
    • Schvalovania
    • IoT
    • VoIP
    • Znalosti
    • WhatsApp
    Third party apps Odoo Studio Odoo Cloud Platform
  • Priemyselné odvetvia
    Retail
    • Book Store
    • Clothing Store
    • Furniture Store
    • Grocery Store
    • Hardware Store
    • Toy Store
    Food & Hospitality
    • Bar and Pub
    • Reštaurácia
    • Fast Food
    • Guest House
    • Beverage distributor
    • Hotel
    Reality
    • Real Estate Agency
    • Architecture Firm
    • Konštrukcia
    • Estate Managament
    • Gardening
    • Property Owner Association
    Poradenstvo
    • Accounting Firm
    • Odoo Partner
    • Marketing Agency
    • Law firm
    • Talent Acquisition
    • Audit & Certification
    Výroba
    • Textile
    • Metal
    • Furnitures
    • Jedlo
    • Brewery
    • Corporate Gifts
    Health & Fitness
    • Sports Club
    • Eyewear Store
    • Fitness Center
    • Wellness Practitioners
    • Pharmacy
    • Hair Salon
    Trades
    • Handyman
    • IT Hardware and Support
    • Solar Energy Systems
    • Shoe Maker
    • Cleaning Services
    • HVAC Services
    Iní
    • Nonprofit Organization
    • Environmental Agency
    • Billboard Rental
    • Photography
    • Bike Leasing
    • Software Reseller
    Browse all Industries
  • Komunita
    Vzdelávanie
    • Tutoriály
    • Dokumentácia
    • Certifikácie
    • Školenie
    • Blog
    • Podcast
    Empower Education
    • Vzdelávací program
    • Scale Up! Business Game
    • Visit Odoo
    Softvér
    • Stiahnuť
    • Porovnanie Community a Enterprise vierzie
    • Releases
    Spolupráca
    • Github
    • Fórum
    • Eventy
    • Preklady
    • Staň sa partnerom
    • Services for Partners
    • Register your Accounting Firm
    Služby
    • Nájdite partnera
    • Nájdite účtovníka
    • Meet an advisor
    • Implementation Services
    • Zákaznícke referencie
    • Podpora
    • Upgrades
    ​Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Získajte demo
  • Cenník
  • Pomoc

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

  • CRM
  • e-Commerce
  • Účtovníctvo
  • Sklady
  • PoS
  • Projektové riadenie
  • MRP
All apps
You need to be registered to interact with the community.
All Posts People Badges
Tagy (View all)
odoo accounting v14 pos v15
About this forum
You need to be registered to interact with the community.
All Posts People Badges
Tagy (View all)
odoo accounting v14 pos v15
About this forum
Pomoc

res_config.py error

Odoberať

Get notified when there's activity on this post

This question has been flagged
configurationsettingsxmlres_config
1 Odpoveď
6184 Zobrazenia
Avatar
hesham.elmahdy@odootec.com

All I need to do is to add a checkbox in the settings of settings>configuration>sales.

This is the .py file:


from openerp import fields, models, _
class sale_quote_settings(models.TransientModel):
_name = 'sale.config.settings'
_inherit = 'sale.config.settings'
group_qty_warning_on_selected_wh = fields.Boolean(_('Qty warning on selected warehouse'),
group="", implied_group="",
required=True, default=True,
help=_("To restrict product count to the stock location of selected warehouse only, when making a quotation"))


this is the .xml file:


<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<record id="odootec_view_sale_config" model="ir.ui.view">
<field name="name">sale settings</field>
<field name="model">sale.config.settings</field>
<field name="inherit_id" ref="sale.view_sales_config"/>
<!--<field name="priority" eval="16"/>-->
<field name="arch" type="xml">
<xpath expr="//div[@name='warehouse_features']" position="inside">
<div>
<field name="group_qty_warning_on_selected_wh" class="oe_inline"/>
<label for="group_qty_warning_on_selected_wh"/>
</div>
</xpath>
</field>
</record>
</data>
</openerp>


this is the error I get:


 2015-05-27 11:09:07,680 8124 INFO nemr werkzeug: 127.0.0.1 - - [27/May/2015 11:09:07] "POST /web/dataset/call_kw/sale.config.settings/fields_view_get HTTP/1.1" 200 -
2015-05-27 11:09:07,738 8124 ERROR nemr openerp.http: Exception during JSON request handling.
Traceback (most recent call last):
  File "/home/hesham/odoo/openerp/http.py", line 536, in _handle_exception
    return super(JsonRequest, self)._handle_exception(exception)
  File "/home/hesham/odoo/openerp/http.py", line 573, in dispatch
    result = self._call_function(**self.params)
  File "/home/hesham/odoo/openerp/http.py", line 309, in _call_function
    return checked_call(self.db, *args, **kwargs)
  File "/home/hesham/odoo/openerp/service/model.py", line 113, in wrapper
    return f(dbname, *args, **kwargs)
  File "/home/hesham/odoo/openerp/http.py", line 306, in checked_call
    return self.endpoint(*a, **kw)
  File "/home/hesham/odoo/openerp/http.py", line 802, in __call__
    return self.method(*args, **kw)
  File "/home/hesham/odoo/openerp/http.py", line 402, in response_wrap
    response = f(*args, **kw)
  File "/home/hesham/odoo/openerp/addons/web/controllers/main.py", line 937, in call_kw
    return self._call_kw(model, method, args, kwargs)
  File "/home/hesham/odoo/openerp/addons/web/controllers/main.py", line 929, in _call_kw
    return getattr(request.registry.get(model), method)(request.cr, request.uid, *args, **kwargs)
  File "/home/hesham/odoo/openerp/api.py", line 241, in wrapper
    return old_api(self, *args, **kwargs)
  File "/home/hesham/odoo/openerp/addons/sale_stock/res_config.py", line 64, in default_get
    res = super(sale_configuration, self).default_get(cr, uid, fields, context)
  File "/home/hesham/odoo/openerp/api.py", line 241, in wrapper
    return old_api(self, *args, **kwargs)
  File "/home/hesham/odoo/openerp/addons/sale/res_config.py", line 88, in default_get
    res = super(sale_configuration, self).default_get(cr, uid, fields, context)
  File "/home/hesham/odoo/openerp/api.py", line 241, in wrapper
    return old_api(self, *args, **kwargs)
  File "/home/hesham/odoo/openerp/addons/base/res/res_config.py", line 510, in default_get
    classified = self._get_classified_fields(cr, uid, context)
  File "/home/hesham/odoo/openerp/api.py", line 241, in wrapper
    return old_api(self, *args, **kwargs)
  File "/home/hesham/odoo/openerp/addons/base/res/res_config.py", line 498, in _get_classified_fields
    groups.append((name, map(ref, field_groups), ref(field.implied_group)))
  File "/home/hesham/odoo/openerp/addons/base/res/res_config.py", line 489, in ref
    mod, xml = xml_id.split('.', 1)
ValueError: need more than 1 value to unpack


What is wrong with my code?

0
Avatar
Zrušiť
Avatar
Zbik
Best Answer

Error in line ... group="", implied_group=""

You define not empty groups, like ... group='base.group_user', implied_group='my.group'

See examples  


1
Avatar
Zrušiť
hesham.elmahdy@odootec.com
Autor

Thank you zbik. You are right.

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

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

Registrácia
Related Posts Replies Zobrazenia Aktivita
How can I save/load my own configuration/settings Solved
configuration settings res_config
Avatar
Avatar
Avatar
Avatar
6
apr 23
40340
disable delete and edit options in conversations Odoo 15
configuration settings
Avatar
Avatar
Avatar
2
apr 24
5330
In res_config.py why odoo cannot find a field that is already defined? Solved
settings res_config
Avatar
Avatar
1
máj 15
6371
What are the things to watch out for before my OpenERP goes live? Version 7.
configuration settings
Avatar
0
mar 15
8148
Reserve Profit and Loss Account
configuration settings
Avatar
Avatar
1
mar 15
7478
Komunita
  • Tutoriály
  • Dokumentácia
  • Fórum
Open Source
  • Stiahnuť
  • Github
  • Runbot
  • Preklady
Služby
  • Odoo.sh hosting
  • Podpora
  • Vyššia verzia
  • Custom Developments
  • Vzdelávanie
  • Nájdite účtovníka
  • Nájdite partnera
  • Staň sa partnerom
O nás
  • Naša spoločnosť
  • Majetok značky
  • Kontaktujte nás
  • Pracovné ponuky
  • Eventy
  • Podcast
  • Blog
  • Zákazníci
  • Právne dokumenty • Súkromie
  • Bezpečnosť
الْعَرَبيّة 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 sada podnikových aplikácií s otvoreným zdrojovým kódom, ktoré pokrývajú všetky potreby vašej spoločnosti: CRM, e-shop, účtovníctvo, skladové hospodárstvo, miesto predaja, projektový manažment atď.

Odoo prináša vysokú pridanú hodnotu v jednoduchom použití a súčasne plne integrovanými biznis aplikáciami.

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