小编Jea*_*aka的帖子

如何在OpenERP 7中添加自动增量字段?

我搜索并修改了一个简单的openerp自定义模块的源代码,我给出了下面的代码

init .py

import sim
Run Code Online (Sandbox Code Playgroud)

openerp .py

{
'name': 'Student Information Management',
'version': '0.1',
'category': 'Tools',
'description': """This module is for the Student Information Management.""",
'author': 'Mr Praveen Srinivasan',
    'website': 'http://praveenlearner.wordpress.com/',
'depends': ['base'],
'data': ['sim_view.xml'],
'demo': [],
'installable': True,
    'auto_install': False,
    'application': True,
}
Run Code Online (Sandbox Code Playgroud)

sim_view.xml

<?xml version="1.0"?>
<openerp>
<data>
<!-- ============== student================= -->
<!-- 1st part of the sim_view start-->
<record model="ir.ui.view" id="student_form">
<field name="name">Student</field>
<field name="model">sim.student</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Student" version="7.0">
<group>
<field name="reg_no"/>
<field name="student_name"/> …
Run Code Online (Sandbox Code Playgroud)

auto-increment openerp openerp-7

5
推荐指数
1
解决办法
6209
查看次数

Python中if / else语句错误中不受支持的操作数

我是Python的新手,我做错了什么?

if p1_teller == 0 & p1_raw[0:1] != "/":
    print "Loop 1"
else:
    print "Loop 2"
Run Code Online (Sandbox Code Playgroud)

然后我得到以下错误:

TypeError:&不支持的操作数类型:“ int”和“ str”

python if-statement

1
推荐指数
1
解决办法
457
查看次数