odoo

i want to add a new field to an existing module odoo11 but i don't know why it didn't work

…衆ロ難τιáo~ 提交于 2019-12-27 06:13:20
问题 product_template.xml the view to add the customizing field to the product module <?xml version="1.0" encoding="utf-8"?> <odoo> <data> <record id="product_template_only_form_view_inherit" model="ir.ui.view"> <field name="name">product.template.common.form</field> <field name="model">product.template</field> <field name="inherit_id" ref="product.product_template_only_form_view " /> <field name="arch" type="xml"> <xpath expr="//field[@name='list_price']" position="after"> <field name="list_price

Odoo 10: enter value in Many2one field dynamically

做~自己de王妃 提交于 2019-12-25 18:11:07
问题 I added in my models.py : commercial_group = fields.Many2one("simcard.simcard") and in my views.xml : <field name="commercial_group" widget="selection"/> And then i am trying to create a new record in my model like this : record.sudo().create({ "icc": icc.text, "imsi": imsi.text, "msisdn": msisdn.text, "lte_status": lte_status.text, "life_cycle_status": life_cycle_status.text, "sim_model": simmodel.text, "gprs_status": gprsStatus.text, "consumption_monthly_data_limit": consumption_monthly

odoo8.0+PyCharm4.5开发环境配置

空扰寡人 提交于 2019-12-25 14:13:13
终于把odoo的开发环境配置好,现把相关经验教训做个记录分享: odoo8.0+PyCharm4.5开发环境配置(剑飞花 373500710) 1.最佳兼容搭配包 试过各种组合 GreenOdoo+pC4.5;OpenERP-China+pc4.5;odoo每日同步版(git@OSC)都因为各种原因无法通过调试。 最终使用github的odoo原版+PC4.5+postgres9.2+win7 32位终于跑起来了。 个中过程,说出来都是泪啊。无数次系统安装,无数次虚拟机恢复成初始状态,适配各种版本的插件包。。。。。 在这感谢odoo中国群的@深圳-飞飞等热心群友的帮助。 2.配置开发环境所需软件共享 360网盘: http://yunpan.cn/ccqVChVN59Phz 访问密码 c791 特别是py的插件包,有些源码的只能在Linux中安装,exe的能在windows下安装的不好找啊。 倾情奉献。 3.配置安装顺序 3.1.先安装基础支撑软件JDK,doNet4.5 3.2.接下来安装pythonxy,注意安装了pythonxy可以不用再安装python了。 3.3.安装git,postgresSQL,pc4.5等等没安装的。 4.下载odoo8代码 4.1.在根目录建目录odoo 4.2.进入odoo目录,在空白出单击鼠标右键,在弹出菜单选择“git bash”

Selectively display or hide button in the tree view in OpenERP

有些话、适合烂在心里 提交于 2019-12-25 04:09:07
问题 I have placed the buttons (icon is green arrow) in the treeview. I want to show a button only if the record has a Bill of Material (BOM). I do have logic how to find out that, but don't know how to selectively display or hide a button. Also, the display or hide button action should be triggered when the view is loaded. How I can do that since there is no view_on_load event like in Visual Basic for instance? Here is the tree view: Here is how the buttons are defined in XML file: <!-- mrp_bom -

Report formatting not working in Odoo 8 Qweb Reports

别说谁变了你拦得住时间么 提交于 2019-12-25 03:38:07
问题 All the default reports and the new reports that I am generating are being printed towards the left of the page. This only happens when the report is generated in PDF format. In HTML format the report is displayed fine. I did some research and found that downgrading the wkhtmltox to version 0.21.1 would solve this problem. I did that, but the problem still persists. 回答1: There is one small configuration Go to settings --> Technical --> Parameters --> System Parameters --> Click on Create and

How to prevent duplicated records and only update it?

妖精的绣舞 提交于 2019-12-25 03:11:48
问题 i want to add some records to another table model without duplicated it i create a function to check the table data and return specific values to add it in another table here is my code def lol_hah(self,cr,uid,ids,context=None): noobs_data=[] cr.execute("select DISTINCT ON (subject_id)subject_id from fci_attendance_line") noobs1 = cr.dictfetchall() ages = [li['subject_id'] for li in noobs1] print (ages) for k in ages: cr.execute( "select DISTINCT ON (student_id)student_id, count(present) AS

ODOO How to create many2one record from Android Studio using aXMLRPC library?

六月ゝ 毕业季﹏ 提交于 2019-12-25 02:32:26
问题 I am trying to create a new record in fleet.vehicle model. Since the Type of record is Many2One , it throws the following exception. de.timroes.axmlrpc.XMLRPCServerException: Traceback (most recent call last): However I was able to create a record in res.user model with the same code snippet because the Type was char for res.user model. My code Snippet is: public Integer create(String model, HashMap values) { Integer newObjectId = null; try { XMLRPCClient client = new XMLRPCClient(mUrl);

Unable SSL/TLS on Odoo Website Builder

不羁岁月 提交于 2019-12-25 01:18:12
问题 The only why to deploy my Odoo Website on my host, is by creating a Subdomain to get the CNAME over Odoo. Unfortunately, if i do that i can't use my free Top Level Domain from Strato. A Wildcard isn't possible as well. And because I use the Odoo Website, I can't access the .htacces file. Question: Does anyone see a way - how to protect my Website with an SSL certificate? can't see any Documentation from Odoo - only: https://www.odoo.com/documentation/user/10.0/es/website/publish/domain_name

Odoo 10 : Custom module doesn't appear in top black menu after installation

妖精的绣舞 提交于 2019-12-25 00:32:29
问题 I created a custom module which menuitems are like this : <record id="view_sim_tree" model="ir.ui.view"> <field name="name">Sim Tree</field> <field name="model">simcard.simcard</field> <field name="priority" eval="1" /> <field name="arch" type="xml"> <tree string="Sim Tree"> <!-- <button name="open_something" string="Confirmer le pointage" type="object" /> --> <!-- <field name="id" /> --> <field name="icc" /> <field name="imsi" /> <field name="msisdn" /> <field name="id" /> <field name="sim

Odoo v9 domain filter with value user.id throws error that user is not defined

只谈情不闲聊 提交于 2019-12-24 20:52:44
问题 We have an instance of V9 odoo running. Anywhere that a domain filter is used with an evaluated value, an error is thrown. As an example, on the res.users searchview I have created a simple domain filter: [('id', '=', user.id)] When applying this filter the following error is thrown: Error: Failed to evaluate search criterions: {"code":400,"message":"Evaluation Error","data":{"type":"local_exception","debug":"Local evaluation failure\nNameError: name 'user' is not defined\n\n{\"domains\":[[],