Skip to Content
Odoo Menú
  • Registra entrada
  • Prova-ho gratis
  • Aplicacions
    Finances
    • Comptabilitat
    • Facturació
    • Despeses
    • Full de càlcul (IA)
    • Documents
    • Signatura
    Vendes
    • CRM
    • Vendes
    • Punt de venda per a botigues
    • Punt de venda per a restaurants
    • Subscripcions
    • Lloguer
    Imatges de llocs web
    • Creació de llocs web
    • Comerç electrònic
    • Blog
    • Fòrum
    • Xat en directe
    • Aprenentatge en línia
    Cadena de subministrament
    • Inventari
    • Fabricació
    • PLM
    • Compres
    • Manteniment
    • Qualitat
    Recursos humans
    • Empleats
    • Reclutament
    • Absències
    • Avaluacions
    • Recomanacions
    • Flota
    Màrqueting
    • Màrqueting Social
    • Màrqueting per correu electrònic
    • Màrqueting per SMS
    • Esdeveniments
    • Automatització del màrqueting
    • Enquestes
    Serveis
    • Projectes
    • Fulls d'hores
    • Servei de camp
    • Suport
    • Planificació
    • Cites
    Productivitat
    • Converses
    • Validacions
    • IoT
    • VoIP
    • Coneixements
    • WhatsApp
    Aplicacions de tercers Odoo Studio Plataforma d'Odoo al núvol
  • Sectors
    Comerç al detall
    • Llibreria
    • Botiga de roba
    • Botiga de mobles
    • Botiga d'ultramarins
    • Ferreteria
    • Botiga de joguines
    Food & Hospitality
    • Bar i pub
    • Restaurant
    • Menjar ràpid
    • Guest House
    • Distribuïdor de begudes
    • Hotel
    Immobiliari
    • Agència immobiliària
    • Estudi d'arquitectura
    • Construcció
    • Gestió immobiliària
    • Jardineria
    • Associació de propietaris de béns immobles
    Consultoria
    • Empresa comptable
    • Partner d'Odoo
    • Agència de màrqueting
    • Bufet d'advocats
    • Captació de talent
    • Auditoria i certificació
    Fabricació
    • Textile
    • Metal
    • Mobles
    • Menjar
    • Brewery
    • Regals corporatius
    Salut i fitness
    • Club d'esport
    • Òptica
    • Centre de fitness
    • Especialistes en benestar
    • Farmàcia
    • Perruqueria
    Trades
    • Servei de manteniment
    • Hardware i suport informàtic
    • Sistemes d'energia solar
    • Shoe Maker
    • Serveis de neteja
    • Instal·lacions HVAC
    Altres
    • Nonprofit Organization
    • Agència del medi ambient
    • Lloguer de panells publicitaris
    • Fotografia
    • Lloguer de bicicletes
    • Distribuïdors de programari
    Browse all Industries
  • Comunitat
    Aprèn
    • Tutorials
    • Documentació
    • Certificacions
    • Formació
    • Blog
    • Pòdcast
    Potenciar l'educació
    • Programa educatiu
    • Scale-Up! El joc empresarial
    • Visita Odoo
    Obtindre el programari
    • Descarregar
    • Comparar edicions
    • Novetats de les versions
    Col·laborar
    • GitHub
    • Fòrum
    • Esdeveniments
    • Traduccions
    • Converteix-te en partner
    • Services for Partners
    • Registra la teva empresa comptable
    Obtindre els serveis
    • Troba un partner
    • Troba un comptable
    • Contacta amb un expert
    • Serveis d'implementació
    • Referències del client
    • Suport
    • Actualitzacions
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Programar una demo
  • Preus
  • Ajuda

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

  • CRM
  • e-Commerce
  • Comptabilitat
  • Inventari
  • PoS
  • Projectes
  • MRP
All apps
You need to be registered to interact with the community.
All Posts People Badges
Etiquetes (View all)
odoo accounting v14 pos v15
About this forum
You need to be registered to interact with the community.
All Posts People Badges
Etiquetes (View all)
odoo accounting v14 pos v15
About this forum
Ajuda

res_config.py error

Subscriure's

Get notified when there's activity on this post

This question has been flagged
configurationsettingsxmlres_config
1 Respondre
6173 Vistes
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
Descartar
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
Descartar
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!

Registrar-se
Related Posts Respostes Vistes Activitat
How can I save/load my own configuration/settings Solved
configuration settings res_config
Avatar
Avatar
Avatar
Avatar
6
d’abr. 23
40301
disable delete and edit options in conversations Odoo 15
configuration settings
Avatar
Avatar
Avatar
2
d’abr. 24
5287
In res_config.py why odoo cannot find a field that is already defined? Solved
settings res_config
Avatar
Avatar
1
de maig 15
6346
What are the things to watch out for before my OpenERP goes live? Version 7.
configuration settings
Avatar
0
de març 15
8145
Reserve Profit and Loss Account
configuration settings
Avatar
Avatar
1
de març 15
7455
Community
  • Tutorials
  • Documentació
  • Fòrum
Codi obert
  • Descarregar
  • GitHub
  • Runbot
  • Traduccions
Serveis
  • Allotjament a Odoo.sh
  • Suport
  • Actualització
  • Desenvolupaments personalitzats
  • Educació
  • Troba un comptable
  • Troba un partner
  • Converteix-te en partner
Sobre nosaltres
  • La nostra empresa
  • Actius de marca
  • Contacta amb nosaltres
  • Llocs de treball
  • Esdeveniments
  • Pòdcast
  • Blog
  • Clients
  • Informació legal • Privacitat
  • Seguretat
الْعَرَبيّة 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 és un conjunt d'aplicacions empresarials de codi obert que cobreix totes les necessitats de la teva empresa: CRM, comerç electrònic, comptabilitat, inventari, punt de venda, gestió de projectes, etc.

La proposta única de valor d'Odoo és ser molt fàcil d'utilitzar i estar totalment integrat, ambdues alhora.

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