Tags Used In OpenERP 7.0
In OpenERP 7.0. the form view of each object has been redesigned so that the object the user is working on resembles a real document. So, now when a user is creating an invoice, the document which appears on his screen actually looks like a hard copy invoice, a sales order will be similar to a sales order print out and so on. Likewise changes have been brought into the xml file. Html as well as css have been included for designing the forms . Some of the attributes and tags are mentioned below.
Header tag and status bar:
All the buttons appear on the left side of the form and the status bar should appear on the right side of the form. And this has to be in the header tag as shown below...
<header>
<button name="create_marklist" string="Create" type="object"/>
<field name="state" widget="statusbar"
statusbar_visible="draft,sent,invoiced,done"
statusbar_colors='{"draft":"red","done":"blue"}'/>
</header>

some new attributes have been added into the status bar . statusbar_visible shows which all states to be visible to the user . To show the current status of the order statusbar_colors have been used . Here when the status turns to invoice_except the colour changes to red.
Sheet tag:
sheet tag gives your form a real document like appearance.
<sheet><sheet/>

Heading tags:
The <h1> to <h6> tags are used to define HTML headings.
<h1> defines the most important heading. <h6> defines the least important heading.
So if you need to provide headings you can use the corresponding heading tag.
<h1>
<label string="Heading " />
</h1>

Label tag:
Label tag is used to give labels to the corresponding fields. The for attribute tells which field should be provided with a label. An example is shown below
<label for="name"/>
<field name="name"/>

You can also use string attribute so that the label will change to what is given in the string.
<label String="Name"/>
<field name="name"/>

Placeholder attribute:
If you need a default string to appear in your text field you can provide an attribute placeholder as shown below.
<field name="note" placeholder="Terms and conditions..."/>

Editable attribute:
To edit from the tree view itself use the editable attribute in your tree view. This makes the edition simpler.
<tree string="Student Details" editable="bottom">

Help:
Initialy in the tree view there will not be any records . To direct the users to the next step a field called help is provided . You could provide the information using the paragraph tag <p></p> .
<field name="help" type="html">
<p class="oe_view_nocontent_create">
Click to define a new record.
</p><p>
provide your information here.
</p>
</field>

Color and fonts attributes:
You can also provide attributes in the tree string.
<tree string=”Sales order” fonts=”bold:message_unread==True”
colors="grey:state=='cancel';blue:state in (‘waiting_date’,'manual');red:state in ('invoice','shipping')">
<field name="order_number"/>
<field name="date_order"/>
<field name="partner_id"/>
<field name="user_id"/>
<field name="amount"/>
<field name="state"/>
</tree>

In the above example the font of the records appears bold and the colour of the records changes according to the states. If the state of the record is in manual state then the colour of the record in the tree view will be blue in colour as mentioned in the example.
html fields:
OpenERP 7.0 provides html fields too. An Example is shown below.
'memo': fields.html('Note Content'), (This is written in the python file)
<field name="memo" widget="html" class="oe_memo" editor_height="450px" />
By providing this u can bring the editor in to your form

Attachments:
To attach files from your computer you need to use the ‘ir.attachment’ model. The field should have a many2many relation to the ‘ir.attachment’ model. An example is shown below.
'attachment_ids': fields.many2many('ir.attachment', 'message','message_id', 'attachment_id', 'Attachments'),
<field name="attachment_ids" widget="many2many_binary"/>

Widgets available in OpenERP 7.0 widget="one2many_list" : Same as one2many in Openerp 7.0
widget="many2many_tags" : same as many2many in Openerp 7.0
widget="monetary": You will be able to see a dolar symbol after the value
widget="mail_followers" : To add Followers
widget="mail_thread" : Mail to groups
widget="statusbar" : shows the status bar
widget="progressbar" : Shows a progress bar
widget="html" : shows the html fields
widget="url" : Shows the url as a link
widget=”integer” : Only integer values will be saved in the fields
widget="many2many_kanban" :An add button appears and you will be able to see the tree view of the corresponding model.
Tags Used In OpenERP 7.0的更多相关文章
- JavaScript ,Css and Jquery In OpenERP 7.0
From: http://openerpbay.blogspot.jp/2013/02/javascript-css-and-jquery-in-openerp-70.html Hi fellows, ...
- 【转】CentOS 6.3 X64自动安装OpenERP 7.0脚本
原文地址:OpenERP 7.0安装与配置 #!/bin/bash -e # Modified script from Carlos E. Fonseca Zorrilla # . Add the t ...
- openerp 7.0邮件接收中文附件乱码问题解决办法
openerp 7.0邮件接收中文附件乱码问题解决办法: 修改文件\addons\mail\mail_thread.py #1064 line插入代码: h=email.Header.Header(n ...
- 在Ubuntu Server上源码安装OpenERP 8.0,并配置wsgi和nginx运行环境
原文: How to install OpenERP 8.0 Alpha on a fresh Debian / Ubuntu server. OpenERP的安装,可以有多种方式,通过添加源,到 h ...
- OpenERP 7.0 中文报表PDF乱码(WindowsXP)
OpenERP默认安装输出的PDF中文报表都是一些方块: 此问题可以通过oecn_base_fonts模块解决: 更多关于oecn_base_fonts的信息请参考: 1. OpenERPv7.0 中 ...
- Openerp 7.0 附件存储位置
我们知道对OpenERP中的每个内部对象(比如:业务伙伴,采购订单,销售订单,发货单,等等)我们都可以添加任意的附件,如图片,文档,视频等.那么这些附件在OpenERP内部是如何管理的呢? 默认情况下 ...
- 在Ubuntu 12 服务器上源码安装 OpenERP 8.0
原文:http://vivianyw.blog.163.com/blog/static/134547422201421112349489/ 1. 安装SSH: sudo apt-get install ...
- openerp 6.0.2库存业务
一.复式库存(Double-Entry Stock Management)和库存移动(Stock Move) OpenERP的库存管理采取了独特的复式库存(Double-Entry Stock Man ...
- openerp 7.0邮件多用户发送失败问题 解决方法
方法一(推荐): 修改代码/usr/lib/pymodules/python2.7/openerp/addons/base/ir/ir_mail_server.py #425 line: #mail_ ...
随机推荐
- 【tarjan】BZOJ2140-稳定婚姻
又名NTR的故事 [题目大意] n对夫妻Bi和Gi.若某男Bi与某女Gj曾经交往过,他们有私奔的可能性.不妨设Bi和Gj旧情复燃,进而Bj会联系上了他的初恋情人Gk,以此递推.若在Bi和Gi离婚的前提 ...
- LCA(倍增在线算法) codevs 2370 小机房的树
codevs 2370 小机房的树 时间限制: 1 s 空间限制: 256000 KB 题目等级 : 钻石 Diamond 题目描述 Description 小机房有棵焕狗种的树,树上有N个节点, ...
- BZOJ 1040 ZJOI 2008 骑士 树形DP
题意: 有一些战士,他们有战斗力和讨厌的人,选择一些战士,使他们互不讨厌,且战斗力最大,范围1e6 分析: 把战士看作点,讨厌的关系看作一条边,连出来的是一个基环树森林. 对于一棵基环树,我们找出环, ...
- python开发_常用的python模块及安装方法
adodb:我们领导推荐的数据库连接组件bsddb3:BerkeleyDB的连接组件Cheetah-1.0:我比较喜欢这个版本的cheetahcherrypy:一个WEB frameworkctype ...
- qt程序运行时的错误error:undefined reference to `_imp___ZN10QTcpSocketD1Ev'
出现的错误: undefined reference to `_imp___ZN10QTcpSocketD1Ev' undefined reference to `_imp___ZN10QTcpSoc ...
- iOS自定义全屏返回与tableView左划删除手势冲突解决
当自定义一个navigationController实现全屏右划返回时, 使用起来是不是很爽, 代码如下: - (void)viewDidLoad { [super viewDidLoad]; UIG ...
- Ubuntu中升极下载4.2内核
http://tech.hexun.com/2015-09-11/179027013.html 从这段话中所表达出的意思可以了解,Linux Kernel 4.3版本已经开始进行,Linus Torv ...
- REDIS 配制
http://www.cnblogs.com/hoojo/p/4466024.html
- WebLogic中WLS 组件漏洞(CVE-2017-10271)专项检测工具
来源: 时间:2017-12-23 00:00:00 作者: 浏览:1929 次 近期安恒信息在应急响应过程中发现有恶意攻击者利用WebLogic漏洞对企业服务器发起大范围远程攻击,攻击成功后植入挖矿 ...
- koa2搭建服务器+使用mongoose链接mangodb
使用node搭建服务器,用到了现在比较流行的框架koa. 1.初始化package.json npm init -y 2.安装koa2 npm i koa --save 3.搭建服务器 const K ...