如何使odoo服务运行某些标志?(How can I make odoo service run with certain flags?)
我试图将我的odoo服务器的配置文件设置为某个文件,我知道使用
-c <path>
或--config <path>
运行odoo将完成这项工作,但是我正在服务器上运行它像一个服务,所以我不能这样做,既不添加配置到/etc/odoo/odoo.conf,因为我需要2个配置文件。有人知道我怎么能使odoo服务运行某些标志(-c和--load)
这是我在/etc/odoo/odoo.conf的配置
[options] addons_path = /usr/lib/python2.7/distpackages/odoo/addons,/opt/odoo/addons/odoodoto admin_passwd = XXXXXXXXXXXX data_dir = /var/lib/odoo db_host = False db_name = False db_password = False db_port = 5432 db_user = False demo = {} log_level = warn logfile = /var/log/odoo/odoo-server.log logrotate = True proxy_mode = False
而我的第二个配置:
[connector-options] workers = 4 export ODOO_CONNECTOR_CHANNELS=root:5 export ODOO_CONNECTOR_PORT=8069 log-level = warn
而
--load=web,connector
是我需要的另一个标志I'm trying to set the configuration file of my odoo server to certain file, I know that running odoo with the
-c <path>
or--config <path>
will do the work, but I'm running it in the server like a service so I can't do this, neither adding the configs to /etc/odoo/odoo.conf because I need 2 configuration files.Does someone knows how can I can make odoo service run with certain flags(-c and --load)
Here's my config at /etc/odoo/odoo.conf
[options] addons_path = /usr/lib/python2.7/distpackages/odoo/addons,/opt/odoo/addons/odoodoto admin_passwd = XXXXXXXXXXXX data_dir = /var/lib/odoo db_host = False db_name = False db_password = False db_port = 5432 db_user = False demo = {} log_level = warn logfile = /var/log/odoo/odoo-server.log logrotate = True proxy_mode = False
And my second config:
[connector-options] workers = 4 export ODOO_CONNECTOR_CHANNELS=root:5 export ODOO_CONNECTOR_PORT=8069 log-level = warn
And the
--load=web,connector
is the other flag I need
原文:https://stackoverflow.com/questions/43099146
最满意答案
您没有在要插入的
adresse.AID
的liegenschaft.adressid
列中输入内容。您在外键中指定了错误的列,插入或您忘记将数据插入到该列中。
你需要做的其中之一:
insert into adresse (strasse, strassennr, AID) values ('Eisenbahnstrasse', '7', (select oid from ort where name = 'Langenthal' and plz='4900'));
要么
insert into adresse (strasse, strassennr, ortID, AID) values ('Eisenbahnstrasse', '7', (select oid from ort where name = 'Langenthal' and plz='4900'), (select oid from ort where name = 'Langenthal' and plz='4900'));
或者将该外键改为指向ortID而不是AID
You don't have entry in column
adresse.AID
forliegenschaft.adressid
that you want to insert.You either specified wrong column in foreign key, insert or you forgot to insert data into that column.
You need to do one of those:
insert into adresse (strasse, strassennr, AID) values ('Eisenbahnstrasse', '7', (select oid from ort where name = 'Langenthal' and plz='4900'));
or
insert into adresse (strasse, strassennr, ortID, AID) values ('Eisenbahnstrasse', '7', (select oid from ort where name = 'Langenthal' and plz='4900'), (select oid from ort where name = 'Langenthal' and plz='4900'));
or alter that foreign key to point at ortID instead AID
相关问答
更多-
你的列表订单搞砸了。 您正在尝试插入一个product_id为'brbr' (MySQL视为0)和注释文本为1 (MySQL将其转换为'1' )。 重新排序列列表以匹配值(或反之亦然)应该解决它: INSERT INTO comments (user_id, product_id, comment_text, uploaded) VALUES (1, 1, 'brbr', NOW()); -- Here ---^ You've got your column list's ...
-
这个 ERROR 1452: Cannot add or update a child row: a foreign key constraint fails (`asiahospitaldb`.`beds`, CONSTRAINT `departmentId` FOREIGN KEY (`depId`) REFERENCES `department` (`Department_Id`) ON DELETE NO `enter code here`ACTION ON UPDATE NO ACTION) ...
-
确保表格中的当前数据满足您添加的约束条件。 看起来您的管理员拥有无效的部门ID。 Make sure the current data in your table fullfills the constraint you are adding. Looks like you have administrators with invalid department ids.
-
您可以使用set foreign_key_checks = 0;禁用外键检查set foreign_key_checks = 0; 在输入之前(确保使用SET foreign_key_checks = 1;将其设置回来SET foreign_key_checks = 1;运行之后。 你真正应该做的是确保hometeam_id和awayteam_id表指向你正在插入的值。 如果团队表在与游戏表相同的CSV中插入数据,请先进行团队表,但事实并非如此。 最后,您可以删除hometeam_id和awayteam_i ...
-
这可能意味着在cities表的province_id列中你有一些值,例如123,那里的id列中的provinces表中不存在这些值。 因此,MySQL不能强制执行外键(FK)约束,它会失败。 您可以通过运行找到违规记录: SELECT * FROM `cities` WHERE `province_id` NOT IN (SELECT id FROM `provinces`) This probably means that in the province_id column in the citie ...
-
MySQL“无法添加或更新子行:外键约束失败”(MySQL “Cannot add or update a child row: a foreign key constraint fails”)[2022-06-14]
您将要在目标表上运行SHOW CREATE TABLE : SHOW CREATE TABLE `B`.`article`; 这可能会显示表上有一个外键 ,这需要在另一个表中存在一个值,然后才能将其添加到该表中。 具体来说,根据您的错误,字段ticket_id引用故障ticket表中的id字段。 这在首先需要迁移的内容方面引入了一些复杂性 - 必须在引用表( article )之前填充引用的表( ticket )。 在不了解您的表格的情况下,我的猜测是您尚未在ticket表中迁移,而且它是空的。 在填写B ... -
您没有在要插入的adresse.AID的liegenschaft.adressid列中输入内容。 您在外键中指定了错误的列,插入或您忘记将数据插入到该列中。 你需要做的其中之一: insert into adresse (strasse, strassennr, AID) values ('Eisenbahnstrasse', '7', (select oid from ort where name = 'Langenthal' and plz='4900')); 要么 insert into adres ...
-
结果是什么? SELECT * FROM states; 我打赌你没有在该表中有ID 2的条目。 在您可以在另一个表中插入相关条目之前,引用的ID必须存在于该表中。 What is the result of SELECT * FROM states; I would wager you don't have an entry with ID 2 in that table. The referenced ID must exist in that table before you can insert ...
-
这意味着标签表中缺少tag_id cash ......不应该tag_id是一个整数吗? (在这个查询中我的意思是) INSERT INTO `stocks_tags` (`stock_id`, `tag_id`) VALUES (19, 'cash') It means that the tag_id cash is missing from the tag table... shouldn't tag_id be an integer? (in this query I mean) INSERT IN ...
-
MySQL外键约束 - 错误1452 - 无法添加或更新子行(MySQL Foreign key constraint - Error 1452 - Cannot add or update child row)[2022-01-22]
对tblOrderItems存在外键约束, 其ItemID需要引用tblCatalogItems中已存在的ItemID 。 CONSTRAINT `ItemID` FOREIGN KEY (`ItemID`) REFERENCES `tblCatalogItems` (`ItemID`), 该消息仅表示您尝试更新tblOrderItems以引用具有ItemID = 0004的tblCatalogItems的项目,但该项目不存在。 由于ItemID是一个varchar,你可能想引用0004或者在转换为var ...