odoo

nginx 监听非标准端口80,重定向端口丢失问题解决

喜欢而已 提交于 2020-02-05 23:04:32
使用nginx监听8070端口,并转发到8067端口 我的配置文件如下: upstream odoo { server localhost:8067; } upstream odoochat{ server localhost:8072; } server { listen 8070 default_server; listen [::]:8070 default_server; root /var/www/html; index index.html index.htm index.nginx-debian.html; server_name _; location / { # First attempt to serve request as file, then # as directory, then fall back to displaying a 404. # try_files $uri $uri/ =404; # proxy_redirect off; proxy_pass http://odoo; # index index.html; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-HOST $host:

How to create a record without saving it in database

半城伤御伤魂 提交于 2020-02-03 16:22:05
问题 I'm using the Inventory addon of Odoo 12 (but my problem could happen with any module). In this addon, a StockMove model has a move_line_ids field. In the Detailed Operations dialog, we can see a tree view of all the move lines of the selected move. If we click the Add a line button, and set the fields, the values are stored in memory, but not in database unless we click the Confirm button. I would like to copy this behaviour in a @api.onchange() method of my custom StockMove model, but I don

only grouped in a single month

删除回忆录丶 提交于 2020-01-25 07:24:10
问题 I have grouped to get the ID together per month but only one month appears that is November and I have months like December and January added as a movement in those accounts and are included in November, someone knows the reason or how I could solve that it also appears the months that there are movements? image of how I am currently seen: enter link description here code: <record id="proyecto_rc.cuenta_view_search" model="ir.ui.view"> <field name="name">proyecto_rc.account.search </field>

Add colurs to statusbar in odoo10

北城余情 提交于 2020-01-24 10:23:01
问题 Need to add colour in statusbar in odoo10 which available openerp versions eg: <field name = 'state' widget=statusbar clickabe= 'True' statubar_colors='{"new": "blue"}'> How add colours in statusbar in odoo10 Need different color for different states in status bar For eg: Blue color for draft,green for progress, red for cancel 回答1: There is two solution for your requirement: If you need this behavior for only one Form view, Is simple as this: just add style tag to beat the css selector

Add colurs to statusbar in odoo10

爱⌒轻易说出口 提交于 2020-01-24 10:22:25
问题 Need to add colour in statusbar in odoo10 which available openerp versions eg: <field name = 'state' widget=statusbar clickabe= 'True' statubar_colors='{"new": "blue"}'> How add colours in statusbar in odoo10 Need different color for different states in status bar For eg: Blue color for draft,green for progress, red for cancel 回答1: There is two solution for your requirement: If you need this behavior for only one Form view, Is simple as this: just add style tag to beat the css selector

Is it possible to make a one2many relation without specifying the target model's “foreign key field”?

给你一囗甜甜゛ 提交于 2020-01-24 00:54:06
问题 I want to make a superclass that have a one2many relation with says dummy.one . So that every subclass that inherit the superclass will have a one2many relation with dummy.one . The problem is declaring a one2many relation forces me to specify the foreign key which link dummy.one to the superclass . Thus I need to create many2one relation (foreign key) in dummy.one for every subclass that I create. The only trick that works is that I create a many2many relation instead of one2many . Here's an

Odoo权限机制

…衆ロ難τιáo~ 提交于 2020-01-21 13:50:08
权限管理的四个层次 一、菜单级别:不属于指定菜单所包含组的用户看不到该菜单,只隐藏菜单,若知道菜单ID,任然可以通过指定URL访问 二、对象级别:对某个对象是否有“创建,读取,修改,删除”的权限,可以简单理解为表对象 三、记录级别:对对象表中的数据的访问权限,比如“客户”对象,业务员只能对自己所创建的客户有访问权限,而经理可以访问其管辖的所有业务员的“客户”对象 四、字段级别:一个对象或表上的某些字段的访问权限,比如产品的成本字段只有经理有读写权限 1 name = fields.Char('Name', size=128, required=True, select=True, read=['base.group_admin'], write=['base.group_admin']) 定义name字段只有超级用户组可读写 建立权限组 就是我们常说的用户组,通常存放在 "reurity/模块名_security.xml" 文件下 例如: 1 <!-- 新建用户组manager --> 2 3 <record id="manager" model="res.groups"> 4 <field name="category_id" ref="module_category_hidden"/> 5 <field name="name">Manager</field> 6 <field

Odoo treeView列表视图详解

吃可爱长大的小学妹 提交于 2020-01-18 15:58:02
转载请注明原文地址: https://www.cnblogs.com/ygj0930/p/10826414.html TreeView:列表视图 1:<tree>标签的属性 【tree标签内的属性,就是界面上的表现、行为,可以通过视图继承,往tree标签增加属性来自定义tree视图的按钮。】 列表视图的根元素是 <tree> ,它可以有以下几种属性: 1)editable 默认情况下选择单行记录时会打开对应记录的表单,该属性让数据可以在列表内进行编辑,有效的值是top和bottom,可在列表的顶部或底部添加新记录。 2)default_order 重定义视图的排序规则, 以逗号分隔多个字段 ,可使用desc来进行倒序 <tree default_order="sequence,name desc"> 3)decoration-样式名 样式可为 bf加粗, it斜体 或 其他bootstrap样式如:danger红色, info, muted, primary, success绿色,warning橙色等等 , 值为python表达式 ,对每条记录执行相应表达式判断,当结果为true的时候将对应的样式应用。 也可以直接在标签的css样式值中使用表达式来动态设置,如设置颜色: colors="gray:state=='cancel';red:state=='audit';green

odoo与小红书对接笔记

大憨熊 提交于 2020-01-16 16:08:18
由于业务需要,公司内部的ERP系统需要与小红书对接,介于odoo当前的市场覆盖率,apps store里自然是没有与此相关的现成模块可用了,既然没有现成的轮子可用,那么就只能自己造轮子了。 小红书接口 小红书的接口大部分都可以从小红书大学的 开放平台 上找到。这里我们主要的目的是将小红书的订单同步到我们本地的ERP系统中。 产品的匹配 小红书有自己的一套SKU编码,要与本地的ERP做映射关系,这样才能保证产品同步的一致性。这里我们使用了包装,跟ERP中的SKU做了一对一的映射。 小红书的物流模式 小红书支持多种物流模式,其中第三方保税模式是无法从系统中读取到订单状态的,只能利用小红书的回调接口将订单变化时推送到我们的系统中。所幸的是,我们目前的业务使用的一种是直邮,一种是小红书的保税仓(即RED STANDARD模式)。 用户信息 小红书对用户的隐私设置比较严格,只能获取到未发货的订单的用户信息,一旦订单发货,用户信息就变成了脱敏信息。 订单处理 小红书提供了两个与订单相关的接口,一个是批量查询接口,一个是查询某个订单的详细信息。因此我们的同步策略可以设置为先用批量查询接口同步批量订单信息,然后根据不同的订单状态筛选,针对那些没有完成的订单,定时轮询。 一旦订单有了发货时间,就将Odoo中的销售订单设置为确认状态,等订单完成,再自动将与之相关的出库单完成 更多内容请阅读 http:

How to set store trigger for computed fields in Odoo 8?

房东的猫 提交于 2020-01-16 12:09:05
问题 I started using the new API of Odoo v8.0 but I cannot find useful information about store trigger in computed fields like this (for v7.0 and v6.1): Store Parameter in Odoo v6 In Odoo v8.0, I tried to use the same syntax of v7.0 but I couldn't get it to work because the JSON response cannot be returned back to the web client: <function _store_trigger> is not JSON serializable. I read then that store parameter had been converted to Boolean only field (no dict for triggers): Odoo store function: