当我想打印任何报告时,我收到此消息:wkhtmltopdf失败(错误代码:-8).消息:b"
此问题仅适用于Odoo 12版本,但对于以前的版本,它运行良好..此链接将显示警告消息:Wkhtmltopdf警告
这是日志:
Traceback (most recent call last):
File "/home/nebil/.environments/Odoo12/lib/python3.6/site-packages/werkzeug/serving.py", line 205, in run_wsgi
execute(self.server.app)
File "/home/nebil/.environments/Odoo12/lib/python3.6/site-packages/werkzeug/serving.py", line 193, in execute
application_iter = app(environ, start_response)
File "/home/nebil/Documents/odoo/odoo/service/server.py", line 350, in app
return self.app(e, s)
File "/home/nebil/Documents/odoo/odoo/service/wsgi_server.py", line 128, in application
return application_unproxied(environ, start_response)
File "/home/nebil/Documents/odoo/odoo/service/wsgi_server.py", line 117, in application_unproxied
result = odoo.http.root(environ, start_response)
File "/home/nebil/Documents/odoo/odoo/http.py", line 1317, in __call__
return self.dispatch(environ, start_response)
File "/home/nebil/Documents/odoo/odoo/http.py", line 1290, in __call__
return self.app(environ, start_wrapped)
File "/home/nebil/.environments/Odoo12/lib/python3.6/site-packages/werkzeug/wsgi.py", line 599, in __call__ …Run Code Online (Sandbox Code Playgroud) Odoo 配置文件中使用的xmlrc_port和参数有什么区别?http_port
我正在尝试将模块从 Odoo 10 迁移到 12,但它向我显示此错误,我不明白为什么:
\n\n\n\n\n属性中使用的字段“状态”必须出现在视图中,但缺失
\n
你能帮我解决这个问题吗:
\n\nField \'state\' used in attributes must be present in view but is missing:\n - \'state\' in attrs="{\'invisible\': [\'|\',\'|\',(\'journal_entry_ids\', \'!=\', []), (\'state\', \'=\', \'confirm\'),(\'type\', \'!=\', \'bank\')]}"\n - \'state\' in attrs="{\'invisible\': [\'|\',\'|\',(\'journal_entry_ids\', \'=\', []), (\'state\', \'=\', \'confirm\'),(\'type\', \'!=\', \'bank\')]}"\n\nError context:\nView `account.bank.statement.form.reconciliation`\n[view_id: 1684, xml_id: n/a, model: account.bank.statement, parent_id: 462]\nNone while parsing /home/PycharmProjects/Odoo12/bank_reconciliation/views/account_view.xml:4, near\n<record id="view_bank_statement_form_reconciliation" model="ir.ui.view">\n <field name="name">account.bank.statement.form.reconciliation</field>\n <field name="model">account.bank.statement</field>\n <field name="inherit_id" ref="account.view_bank_statement_form"/>\n <field name="arch" type="xml">\n <data>\n <field name="date" position="after">\n <field name="type" …Run Code Online (Sandbox Code Playgroud) 我的模型中有这些字段:
seller = fields.Many2one('res.partner', string="Select Seller",domain="[('supplier','=',True)]")
products= fields.Many2one('product.template', string="Select Product" )
Run Code Online (Sandbox Code Playgroud)
现在,我需要在用户选择卖家时过滤第二个字段(第一个字段)如何设置域名更改。
我正在尝试做类似的事情,
@api.onchange('seller')
def onchange_field_seller(self):
res = {}
if self.seller:
# return {'domain':{'product':[//what do i add here//]}}
return res
Run Code Online (Sandbox Code Playgroud)
我正在使用多对多字段在卖家创建表单中创建产品。
product_details = fields.Many2many('product.template',string="Products")
Run Code Online (Sandbox Code Playgroud)
(请注意,包含此字段的表单与上一问题中的表单不同)。我试图仅获取创建卖家条目时创建的那些产品条目。我真的很困惑,我该如何实现这一点?
销售订单中有两个按钮同名
<button name="action_confirm" id="action_confirm"
string="Confirm" class="btn-primary" type="object"
attrs="{'invisible': [('state', 'not in', ['sent'])]}"/>
**<button name="action_confirm"
string="Confirm" type="object"
attrs="{'invisible': [('state', 'not in', ['draft'])]}"/>**
Run Code Online (Sandbox Code Playgroud)
需要使用 xpath 选择第二个按钮并更改其属性
如何修复ImportError:没有名为“passlib”的模块
/Downloads/odoo-12.0$ ./odoo-bin
Traceback (most recent call last):
File "./odoo-bin", line 5, in <module>
import odoo
File "/home/omprakash/Downloads/odoo-12.0/odoo/__init__.py", line 125, in <module>
from . import modules
File "/home/omprakash/Downloads/odoo-12.0/odoo/modules/__init__.py", line 8, in <module>
from . import db, graph, loading, migration, module, registry
File "/home/omprakash/Downloads/odoo-12.0/odoo/modules/graph.py", line 10, in <module>
import odoo.tools as tools
File "/home/omprakash/Downloads/odoo-12.0/odoo/tools/__init__.py", line 8, in <module>
from .config import config
File "/home/omprakash/Downloads/odoo-12.0/odoo/tools/config.py", line 18, in <module>
from passlib.context import CryptContext
ImportError: No module named 'passlib'
Run Code Online (Sandbox Code Playgroud) 我正在尝试计算要在树视图中显示的值,问题是我的私有函数永远不会被执行并且没有为我的计算字段设置值。
我简化了以下代码:
class ProjectProject(models.Model):
_inherit = "project.project"
assigned = fields.Char(string='Assigned multi', compute='_roles_assigned', store=False)
@api.multi
@api.depends('task_ids')
def _roles_assigned(self):
#do dome calculations
assigned = ' test of 1' #'0 / {total}'.format(total=total)
return assigned
Run Code Online (Sandbox Code Playgroud)
正如您在图像中看到的,该值始终为空
当我单击按钮时,我应该看到一个列表。还应该有创造新记录的能力。但是当我点击按钮时我得到:
找不到类型“form”的默认视图!
如何修复它?
如果我从主菜单进去就没有这个问题
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<data>
<act_window
id="attach_pdf_action"
name="Attach PDF"
res_model="attach.pdf" />
<menuitem
id="attach_pdf_menu"
name="Attach PDF"
action="attach_pdf_action"
parent=""
sequence="5" />
<record id="attach_pdf_view_form" model="ir.ui.view">
<field name="name">Attach PDF Form</field>
<field name="model">attach.pdf</field>
<field name="arch" type="xml">
<form>
<group>
<field name="product_id"/>
<field name="product_attribute_value_id"/>
</group>
<group>
<field name="file" widget="binary" filename="file_name" string="Binary"/>
</group>
</form>
</field>
</record>
<record id="attach_pdf_view_tree" model="ir.ui.view">
<field name="name">Attach PDF List</field>
<field name="model">attach.pdf</field>
<field name="arch" type="xml">
<tree>
<field name="product_id"/>
<field name="product_attribute_value_id"/>
<field name="file_name" readonly="1"/>
</tree>
</field>
</record>
<record id="attach_pdf_view_search" model="ir.ui.view">
<field name="name">Attach …Run Code Online (Sandbox Code Playgroud) 我想加入 <field name="perm_create" eval="False" />现有的记录规则。所以我添加了继承它并添加了我的添加..但没有效果:
<record id="hr_attendance.hr_attendance_rule_attendance_manager" model="ir.rule">
<field name="perm_create" eval="False"/>
</record>
Run Code Online (Sandbox Code Playgroud) 我有一个选择字段,例如
field = fields.Selection([('a', 'A'), ('b', 'B')],string='Test')
Run Code Online (Sandbox Code Playgroud)
当我尝试在选择字段中获取所选元素时,键“a”被打印到pdf中,我需要打印“A”
<t t-esc="med['field']"/>#med 是连接模型 A 和 B 的 one2many 线,我正在尝试从模型 B(笔记本)获取数据,