odoo

odoo:Actions

给你一囗甜甜゛ 提交于 2020-01-08 08:08:52
actions定义了系统对于用户的操作的响应:登录、按钮、选择项目等。 一:窗口action(ir.actions.act_window ) 最常用的action类型,用于 将model的数据展示 出来。 字段列表: 1.res_model -- 需要在view里显示数据的model 2.views -- 一个(view_id, view_type) 列表,view_type代表视图类型如:form,tree,gragh...,view_id是可选的数据库id或False,如果没有指定id,客户端会自动用fields_view_get()获取相应类型的默认视图,type参数列表的第一个会被默认用来展示 3.res_id (可选) -- 当默认的视图类型是form时,可用于指定加载的数据 4.search_view_id (可选) -- (id, name),id是储存在数据库的搜索视图,默认会读取model的默认搜索视图 5.target (可选) -- 定义视图是 在当前视图上打开(current)、使用全屏模式(fullscreen)、使用弹出框(new)、可使用main代替current来清除面包屑导航 6.context (可选) -- 额外的需要传给视图的环境数据 7.domain (可选) -- 自动添加到视图搜索中的查询 8.limit (可选) --

Odoo开发文档-教程-主题教程

天大地大妈咪最大 提交于 2020-01-07 07:30:38
【推荐】2019 Java 开发者跳槽指南.pdf(吐血整理) >>> Odoo崇尚自由,基于自身需求,设计者拥有更长足的自由,而用户拥有任意定制的自由。 准备好创建您自己的主题了吗?好的,这里是一些开始前您必须要了解的内容。这个教程是创建一个Odoo主题的向导。 给网页设计者的介绍 如果您是一个第一次使用Odoo的网页设计者,您来对地方了。这个介绍将概述Odoo主题的基本创建。 Odoo团队已经创建了一个强大和易用的框架。不需要了解特殊的语法就可以使用这套工具。 从常用的CMS到Odoo 如果您总是使用同一种方式思考和工作,您可能会得到同一种结果。如果您想得到全新的结果,那么请尝试一种不同的方法。 我的 header.php 文件在哪里? 这是一个习惯于使用Wordpress或者Joomla的网页设计者第一次转到Odoo时通常会问的问题。 实际上,当使用常规的CMS时,为了创建一个您网站的基本框架,您需要对几个文件进行编码(例如header.php, page.php, post.php等等)。在那些系统中,这些基本框架作为设计的基础,您必须随着时间推移来更新,以确保与您CMS的兼容性。因此,即使您花了数小时对文件进行编码,还没有开始真正的设计。 这些在创建Odoo主题中并不需要。 我们认为主题的设计应该是简单(而且强大)的。当我们创建网站构建器时,我们决定从头开始

Odoo 自定义Widgets 基础教程(章节2)

杀马特。学长 韩版系。学妹 提交于 2020-01-07 05:13:46
【推荐】2019 Java 开发者跳槽指南.pdf(吐血整理) >>> 大家好, 本文将进一步解释odoo widget 的相关原理,其中首先会讲述:1. 什么是widgets 中的继承;2. 为什么有很多 init : function 语法;3. widgets 系统结构; 首先,让我们来看看结构:(来自 /addons/web/ 目录) 问题一:apps.js 是干啥的? 下面是 app.js 的结构:(说明见图) 下面是 core 目录的结构: 这里,我们来回答一下最开始的问题:1. 什么是widgets 中的继承;2. 为什么有很多 init : function 语法;3. widgets 系统结构; 问题1(解答): 因为前端本来是没有继承的,所以,odoo 应用了 commonjs 规范(Javascript模块化编程"全球规范”),这样我们在前端编程中,就可以开始使用继承与_include() /_extend() 等等。 问题2(解答): 这里首先要了解,mixin在javascript是什么。minxin可以看作是一种从别的对象”借用”功能的方法。每一个新定义的对象都有一个 prototype属性,其他的对象就可以从这里”借用”功能。这里的功能可以是一个属性,也可以是一个方法。 mixins这种借用在 javascript里非常的适用

Why does my Odoo 9 custom Qweb report with CSS is not working?

谁说我不能喝 提交于 2020-01-07 04:18:07
问题 I'm creating a new report on Odoo 9 which uses css styles in order to position text over a background image. The image is in background and occupies the full A4 page without any margins. In html, it's working fine. However, when I print the report to PDF, I have blank margins at left and right, and the text goes below the background image. It seems that the CSS rules are not applied. Do you find any solution for making it working in PDF? Here is my report: <template id="sub_proposal"> <style

Hide the Form View in OpenErp (formally as Odoo)

喜欢而已 提交于 2020-01-06 16:29:08
问题 How can I hide the Form View Based on User Access I have created one user (student) in school Management System in openerp. The Admin user is the default user in OpenErp. Admin have all the access rights to acees the Tree view and Form View while How can I restrict the the student user to view only tree view. My Question is how can i hide the Form View When the student user is logged into the system.I wanted to display only the the tree view when he or she is logged into the system while

Not able to add the group sale_manger to action_invoice_cancel button

烂漫一生 提交于 2020-01-06 14:33:42
问题 I want to add sale_manager group to the action_invoice_cancel (Invoice Cancel) button in the customer invoice . My aim is to see that button only for the users in the sale_manager. I tried like this : Code <?xml version="1.0" encoding="utf-8"?> <odoo> <record id="orchid_invoice_cancel_request_inherit" model="ir.ui.view"> <field name="name">invoice_cancel_request</field> <field name="model">account.invoice</field> <field name="inherit_id" ref="account.invoice_form"/> <field name="arch" type=

Odoo实施、开发等级标准

守給你的承諾、 提交于 2020-01-06 14:03:32
【推荐】2019 Java 开发者跳槽指南.pdf(吐血整理) >>> Odoo中文社区 Odoo实施、开发等级标准 (征询意见稿) 初级 理解开源ERP系统的优缺点 掌握在交流群中提问的技巧 掌握Odoo在Windows和Ubuntu系统中的安装 了解Postgresql数据库和Odoo的关系 掌握访问Odoo服务的方法 掌握Odoo配置文件 会依据Odoo日志文件排除简单故障 掌握Odoo的数据库管理和模块管理 掌握Odoo汉化修改方法 掌握第三方模块的安装方法 掌握Odoo进销存财务的基本流程和操作 了解各进销存财务模块的设置 了解Odoo仓库和库位的设置 了解Odoo路线的推、拉流的设置 了解Odoo的权限设置方法 来源: oschina 链接: https://my.oschina.net/u/3701387/blog/3152213

Odoo image in excel

僤鯓⒐⒋嵵緔 提交于 2020-01-06 07:12:17
问题 I'm creating an excel file with xlsxwriter and need to place my company logo into these excel file.. I've been trying with insert_image but not success. I suppose that is something like parse partner.image into a buffer... but im stuck.. Pleace your help. this is my code. @api.multi def report_print(self): output=io.BytesIO() book=xlsxwriter.Workbook(output) sheet1=book.add_worksheet("PCA") sheet1.write('A1','PCA') #======================================================================= #

Odoo image in excel

邮差的信 提交于 2020-01-06 07:11:07
问题 I'm creating an excel file with xlsxwriter and need to place my company logo into these excel file.. I've been trying with insert_image but not success. I suppose that is something like parse partner.image into a buffer... but im stuck.. Pleace your help. this is my code. @api.multi def report_print(self): output=io.BytesIO() book=xlsxwriter.Workbook(output) sheet1=book.add_worksheet("PCA") sheet1.write('A1','PCA') #======================================================================= #

how to hide the button based on a condition? odoo 11

一曲冷凌霜 提交于 2020-01-06 06:31:41
问题 I want to hide the "create invoice" button (in quotation view) based on a condition if the command line has a task/service, I tried this code but it does not work : <button name="%(sale.action_view_sale_advance_payment_inv)d" string="Create Invoice" type="action" context="{'default_advance_payment_method': 'percentage'}" attrs="{'invisible': ['|','|', ('task_ids', '=', []), ('invoice_status', '!=', 'no'), ('state', '!=', 'sale')]}"/> 回答1: You can add a style, display: none to a button to hide