summaryrefslogtreecommitdiff
path: root/odoo/addons/base/data/base_data.sql
AgeCommit message (Collapse)Author
2020-12-30[FIX] base_data.sql: remove obsolete field sizeIvan Yelizariev
those field sizes were deleted from orm definition in 2014 https://github.com/odoo/odoo/commit/026e38b48f3963aed08bba4e76a0a796d662f6a4 STEPS: * set manifest's summary attribute to a long string * create empty database BEFORE: error ``` 2020-12-28 10:44:51,325 1 ERROR ? odoo.sql_db: bad query: UPDATE ir_module_module SET state='installed' WHERE state IN ('to remove', 'to upgrade') ERROR: relation "ir_module_module" does not exist LINE 1: UPDATE ir_module_module SET state='installed' WHERE state IN... ^ 2020-12-28 10:44:51,325 1 ERROR ? odoo.modules.registry: Failed to load registry Traceback (most recent call last): File "/opt/odoo/custom/src/odoo/odoo/modules/registry.py", line 86, in new odoo.modules.load_modules(registry._db, force_demo, status, update_module) File "/opt/odoo/custom/src/odoo/odoo/modules/loading.py", line 338, in load_modules odoo.modules.db.initialize(cr) File "/opt/odoo/custom/src/odoo/odoo/modules/db.py", line 63, in initialize info['sequence'], info['summary'])) File "/opt/odoo/custom/src/odoo/odoo/sql_db.py", line 173, in wrapper return f(self, *args, **kwargs) File "/opt/odoo/custom/src/odoo/odoo/sql_db.py", line 250, in execute res = self._obj.execute(query, params) psycopg2.DataError: value too long for type character varying(256) During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/opt/odoo/custom/src/odoo/odoo/modules/registry.py", line 88, in new odoo.modules.reset_modules_state(db_name) File "/opt/odoo/custom/src/odoo/odoo/modules/loading.py", line 558, in reset_modules_state "UPDATE ir_module_module SET state='installed' WHERE state IN ('to remove', 'to upgrade')" File "/opt/odoo/custom/src/odoo/odoo/sql_db.py", line 173, in wrapper return f(self, *args, **kwargs) File "/opt/odoo/custom/src/odoo/odoo/sql_db.py", line 250, in execute res = self._obj.execute(query, params) psycopg2.ProgrammingError: relation "ir_module_module" does not exist LINE 1: UPDATE ir_module_module SET state='installed' WHERE state IN... ``` AFTER: database successfully created --- opw-2415057 closes odoo/odoo#63907 X-original-commit: 2a44e233deffd17460e0e9a8f8225602a28c24a6 Signed-off-by: Ivan Yelizariev // IEL <yelizariev@users.noreply.github.com>
2020-05-27[IMP] base: make ir.model.data use access fieldsXavier Morel
Apparently some "core objects" used to have a pair of fields (date_init, date_update) which predate the current access fields (hopefully anyway, the genesis of both is lost to time so we can only speculate). odoo/odoo#34988 removed them on constrains & relations and left them on ir.model.data, but they do seem redundant with the regular access fields which *are* enabled on ir.model.data. * removes the date_init/date_update fields * converts the one bit of code which did set those to set create_date/write_date * add a default value on the columns, to ensure create_date is properly set even from SQL queries * use create_date/write_date in the view * adds setting those columns to a bunch of raw SQL queries which were missing them (also updates the queries some to merge the literal values into the queries as it seems unnecessary to interpolate e.g. a boolean literal) Builds on and closes odoo/odoo#50516 as that's why I started looking into it, and that fix is in this branch as well. closes odoo/odoo#50661 Related: odoo/upgrade#1213 Related: odoo/enterprise#10772 Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
2019-08-20[IMP] models: ORM speedupRaphael Collet
This branch is the combination of several optimizations in the ORM: * store field values once in the cache: the cache reflects more faithfully the database, only fields that explicitly depend on the context have an extra indirection in the cache; * delay recomputations by default: use method `recompute` to explicitly flush out pending recomputations; * delay updates in method `write`: updates are stored in a data structure that can be flushed efficiently to the database with method `flush` (which also flush out recomputations); * make method `modified` take advantage of inverse fields to inverse dependencies; * filter records by evaluating a domain on records in Python; * a computed field with `readonly=False` behaves like a normal field with an onchange method; * computed fields are computed in superuser mode by default. Work done by Toufik Ben Jaa, Raphael Collet, Denis Ledoux and Fabien Pinckaers. closes odoo/odoo#35659 Signed-off-by: Denis Ledoux <beledouxdenis@users.noreply.github.com>
2019-05-07[IMP] core: allow auto_install restriction on a subset of dependenciesXavier Morel
Currently, auto_install is triggered when all dependencies get installed, but there are cases where one would want such trigger on only a subset thereof. e.g. we want `website_sale_dashboard` to auto-install when `website_sale` is installed. Currently, it requires `web_dashboard` to also be auto-installed otherwise `website_sale_dashboard` would "wait" for both dependencies to be explicitly installed before the auto-install triggers. That's despite `web_dashboard` not being very useful on its own. More generally this is an issue with technical modules which need to be marked as auto_install so as not to block e.g. bridge modules from automatically installing. This change allows setting `auto_install` to a subset of `depends`: * if auto_install is set to `False`, the module does not get automatically installed (no change in semantics) * if auto_install is set to `True`, the module gets automatically installed if and only if all its dependencies are installed (also no change in semantics) * if auto_install is set to a list of dependencies, the module will be installed when all *these* dependencies are installed, other dependencies (excluded from auto_install) will be installed alongside as a consequence * auto_install can be set to an empty list, in this case the module will always be automatically installed regardless of its dependencies (and will force their installation). So after this change, `web_dashboard`'s auto_install can be set to `False` (such that it's not installed if no module defining dashboards is installed) and `website_sale_dashboard`'s manifest can be edited to: 'auto_install': ['website_sale'] possibilities: # no automatic installation 'depends': ['a', 'b'], 'auto_install': False # automatic installation if both a and b are installed 'depends': ['a', 'b'], 'auto_install': True # automatic installation if both a and b are installed (explicit) 'depends': ['a', 'b'], 'auto_install': ['a', 'b'] # automatic installation if b is installed, a will get forcefully # installed if it isn't yet 'depends': ['a', 'b'], 'auto_install': ['b'] # always automatically installed, will cause the installation of # its dependencies even if they're not marked explicitly 'depends': ['a', 'b'], 'auto_install': [] Task 1851328 closes odoo/odoo#29431 Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
2018-10-22[MERGE] forward port branch saas-11.4 up to 3c108977c1eChristophe Simonis
2018-10-19[MERGE] forward port branch saas-11.3 up to d82a9077289Christophe Simonis
2018-10-19[MERGE] forward port branch 11.0 up to 22a13073f0eChristophe Simonis
2018-08-23[IMP] base: add regular user admin as uid 2Raphael Collet
User 1 simply becomes a technical user (inactive, no password).
2018-08-06[IMP] base: improve kanban of modules, cards not clickable (top-right menu)Fabien Pinckaers
[NEW] base: show enterprise module, with an 'upgrade' button [IMP] *: some modules renaming, and improved copywriting of manifest [IMP] *: utm on links to odoo.com
2018-05-24[IMP] merge auth_crypt into basexmo-odoo
* store hashed passwords in the `password` column but gate it behind a computed field * make the password field essentially write-only (SQL aside) * add a "plaintext" hash type so it's possible to set the password in SQL directly & be able to login & have it automatically updated Task 34211
2018-03-12[IMP] base: set a create_date on first recordsMartin Trigaux
create_date is not required but may be assumed as always set such as in base.partner.merge comparison The administrator had no create_date set Avoid errors in merge wizard if one of the record has no create_date Fixes #22730
2017-11-27[MOV] base: move base.sql to data/base_data.sqlThibault Delavallée