Odoo is the world's easiest all-in-one management software. It includes hundreds of business apps:
CRM | e-Commerce | Accounting | Inventory | PoS | Project management | MRP | etc.
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, _
_name = 'sale.config.settings'
_inherit = 'sale.config.settings'
group_no_warning_on_wh_qty = fields.Boolean(_('No warning on selected warehouse 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="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"/>
About This Community
This platform 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.Register
Odoo Training Center
Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.Test it now
|Asked: 5/27/15, 8:15 PM|
|Seen: 1182 times|
|Last updated: 5/27/15, 8:15 PM|