diff options
| author | Martin Trigaux <mat@odoo.com> | 2018-03-12 10:26:44 +0100 |
|---|---|---|
| committer | Martin Trigaux <mat@odoo.com> | 2018-03-12 14:31:05 +0100 |
| commit | b661881e3514a515244ba81ecb278d29d55d55fb (patch) | |
| tree | 411a2c15c118bdd82576e6adbd3ca0792e595d53 /odoo/addons/base/data/base_data.sql | |
| parent | 414b1ef7817cc24d348d59a65d7ce19d5af091c4 (diff) | |
[IMP] base: set a create_date on first records
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
Diffstat (limited to 'odoo/addons/base/data/base_data.sql')
| -rw-r--r-- | odoo/addons/base/data/base_data.sql | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/odoo/addons/base/data/base_data.sql b/odoo/addons/base/data/base_data.sql index 57d57a1389b..30d6cc6cd89 100644 --- a/odoo/addons/base/data/base_data.sql +++ b/odoo/addons/base/data/base_data.sql @@ -21,6 +21,7 @@ CREATE TABLE res_users ( -- (when the destination rows exist) company_id integer, -- references res_company, partner_id integer, -- references res_partner, + create_date timestamp without time zone, primary key(id) ); @@ -106,6 +107,7 @@ CREATE TABLE res_company ( name varchar NOT NULL, partner_id integer, currency_id integer, + create_date timestamp without time zone, primary key(id) ); @@ -113,6 +115,7 @@ CREATE TABLE res_partner ( id serial, name varchar, company_id integer, + create_date timestamp without time zone, primary key(id) ); @@ -124,15 +127,15 @@ insert into res_currency (id, name, symbol) VALUES (1, 'EUR', '€'); insert into ir_model_data (name, module, model, noupdate, res_id) VALUES ('EUR', 'base', 'res.currency', true, 1); select setval('res_currency_id_seq', 2); -insert into res_company (id, name, partner_id, currency_id) VALUES (1, 'My Company', 1, 1); +insert into res_company (id, name, partner_id, currency_id, create_date) VALUES (1, 'My Company', 1, 1, now() at time zone 'UTC'); insert into ir_model_data (name, module, model, noupdate, res_id) VALUES ('main_company', 'base', 'res.company', true, 1); select setval('res_company_id_seq', 2); -insert into res_partner (id, name, company_id) VALUES (1, 'My Company', 1); +insert into res_partner (id, name, company_id, create_date) VALUES (1, 'My Company', 1, now() at time zone 'UTC'); insert into ir_model_data (name, module, model, noupdate, res_id) VALUES ('main_partner', 'base', 'res.partner', true, 1); select setval('res_partner_id_seq', 2); -insert into res_users (id, login, password, active, partner_id, company_id) VALUES (1, 'admin', 'admin', true, 1, 1); +insert into res_users (id, login, password, active, partner_id, company_id, create_date) VALUES (1, 'admin', 'admin', true, 1, 1, now() at time zone 'UTC'); insert into ir_model_data (name, module, model, noupdate, res_id) VALUES ('user_root', 'base', 'res.users', true, 1); select setval('res_users_id_seq', 2); |
