Odoo Help


This community is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.


new checkbox in sales configuration settings not updated to DB

on 5/27/15, 8:15 PM 622 views

Added an option checkbox to settings>configuration>sale view. But when click and checkbox (make it checked) and then hit the Apply button, the checkbox becomes unchecked. The value `True` is not saved to the database. I reviewed my code and compared it to similar code and could not find any difference, except that my config class is using models.TransientModel but everything else in odoo is still using osv.osv_memory. Hence, the code is practically identical; then why is this happening?

Also, I noticed that every time I check and un-check any other checkbox, a new row is inserted in the relative table xxx.config.settings; where xxx is any model that has a config.settings table. Is this a normal behavior? Shouldn't it be just one row that holds the settings for the model?

Here is the code:

 from openerp import fields, models, _

class sale_quote_settings(models.TransientModel):
_name = 'sale.config.settings'
_inherit = 'sale.config.settings'

group_no_warning_on_wh_qty = fields.Boolean(_('No warning on selected warehouse qty'),
# implied_group="sale.group_no_warning_on_wh_qty",
# required=True, #default=False,
"To unrestrict qty count to selected warehouse location only, when making a quotation"))

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

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

1 follower(s)


Asked: 5/27/15, 8:15 PM
Seen: 622 times
Last updated: 5/27/15, 8:15 PM