Community: Framework mailing list archives

expert-framework@mail.odoo.com

Configuration settings - creates a new record every time.

by
Maxim Litnitskiy
- 09/25/2014 18:54:47
Spent already more then 3 hours trying to understand how Configuration pages work.

res_config_settings - Base configuration wizard for application settings.  It provides support for setting
        default values, assigning groups to employee users.

So I am trying to store my app settings using res.config.settings.

But it:
1) Creates a new record on every Apply.
2) Does not read stored values.

Where I missed?
Thanks!


odoo=# SELECT * from asterisk_server_settings;
 id | create_uid |        create_date         | ari_user |        ari_url        | write_uid |         write_date         | context_name | default_ari_url | ari_pass 
----+------------+----------------------------+----------+-----------------------+-----------+----------------------------+--------------+-----------------+----------
  1 |          1 | 2014-09-25 22:22:57.624627 | aaaa     | http://localhost:8088 |         1 | 2014-09-25 22:22:57.624627 | dialer       |                 | aaa
  2 |          1 | 2014-09-25 22:31:33.396451 | 1        | http://localhost:1111 |         1 | 2014-09-25 22:31:33.396451 | dialer       |                 | 1
  3 |          1 | 2014-09-25 22:33:51.800946 | d        | http://localhost:8088 |         1 | 2014-09-25 22:33:51.800946 | dialer       |                 | d
  4 |          1 | 2014-09-25 22:45:18.303018 | s        | http://localhost:8088 |         1 | 2014-09-25 22:45:18.303018 | dialer       |                 | s
  5 |          1 | 2014-09-25 22:45:32.1802   | s        | http://localhost:8088 |         1 | 2014-09-25 22:45:32.1802   | dialer       |                 | s
  6 |          1 | 2014-09-25 22:45:46.820791 | s        | http://localhost:8088 |         1 | 2014-09-25 22:45:46.820791 | dialer       |                 | s
(6 rows)