[FIX] Database creation fixed by breaking the circular dependencies with multi-company init.
Still need to fix the init to re-establish the FK reference on res_users' company_id field. bzr revid: odo@openerp.com-20100329085600-r0pjh7rjyq2rw44n
This commit is contained in:
parent
9a7120d5c3
commit
45e715d713
|
@ -147,7 +147,10 @@ CREATE TABLE res_users (
|
|||
signature text,
|
||||
-- action_id int references ir_act_window on delete set null,
|
||||
context_lang varchar(64) default '',
|
||||
-- No FK references below, will be added later by ORM
|
||||
-- (when the destination rows exist)
|
||||
action_id int,
|
||||
company_id int,
|
||||
primary key(id)
|
||||
);
|
||||
alter table res_users add constraint res_users_login_uniq unique (login);
|
||||
|
@ -342,7 +345,7 @@ CREATE TABLE ir_model_data (
|
|||
-- Users
|
||||
---------------------------------
|
||||
|
||||
insert into res_users (id,login,password,name,action_id,active) values (1,'admin',NULL,'Administrator',NULL,True);
|
||||
insert into res_users (id,login,password,name,action_id,active,company_id) values (1,'admin',NULL,'Administrator',NULL,True,1);
|
||||
insert into ir_model_data (name,module,model,noupdate,res_id) values ('user_root','base','res.users',True,1);
|
||||
|
||||
-- Compatibility purpose, to remove V6.0
|
||||
|
|
|
@ -1001,6 +1001,8 @@
|
|||
|
||||
<record id="main_partner" model="res.partner">
|
||||
<field name="name">Tiny sprl</field>
|
||||
<!-- Company ID will be set later -->
|
||||
<field name="company_id" eval="None"/>
|
||||
</record>
|
||||
<record id="main_address" model="res.partner.address">
|
||||
<field name="partner_id" ref="main_partner"/>
|
||||
|
@ -1011,14 +1013,18 @@
|
|||
<field name="phone">(+32).81.81.37.00</field>
|
||||
<field name="type">default</field>
|
||||
<field model="res.country" name="country_id" ref="be"/>
|
||||
<!-- Company ID will be set later -->
|
||||
<field name="company_id" eval="None"/>
|
||||
</record>
|
||||
|
||||
|
||||
<!-- Currencies -->
|
||||
<record id="EUR" model="res.currency">
|
||||
<field name="name">EUR</field>
|
||||
<field name="code">EUR</field>
|
||||
<field name="rounding">0.01</field>
|
||||
<field name="accuracy">4</field>
|
||||
<!-- Company ID will be set later -->
|
||||
<field name="company_id" eval="None"/>
|
||||
</record>
|
||||
<record id="rateEUR" model="res.currency.rate">
|
||||
<field name="rate">1.0</field>
|
||||
|
@ -1042,12 +1048,21 @@
|
|||
</assert>
|
||||
<record id="user_admin" model="res.users">
|
||||
<field name="company_id" ref="main_company"/>
|
||||
</record>
|
||||
</record>
|
||||
<record id="main_partner" model="res.partner">
|
||||
<field name="company_id" ref="main_company"/>
|
||||
</record>
|
||||
<record id="main_address" model="res.partner.address">
|
||||
<field name="company_id" ref="main_company"/>
|
||||
</record>
|
||||
<record id="EUR" model="res.currency">
|
||||
<field name="company_id" ref="main_company"/>
|
||||
</record>
|
||||
|
||||
|
||||
<!-- Currencies -->
|
||||
<record id="EUR" model="res.currency">
|
||||
<field name="company_id" ref="main_company"/>
|
||||
</record>
|
||||
<record id="USD" model="res.currency">
|
||||
<field name="name">USD</field>
|
||||
<field name="code">USD</field>
|
||||
|
|
Loading…
Reference in New Issue