~openerp-chinese-team/openerp-china/openerp-china

« back to all changes in this revision

Viewing changes to contract/contract_view.xml

  • Committer: JoshuaJan
  • Date: 2012-11-13 13:34:17 UTC
  • mfrom: (88.1.1 openerp-china)
  • Revision ID: popkar77@gmail.com-20121113133417-hoe5mhl3kgpmv6hi
merge

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<?xml version="1.0" encoding="UTF-8" ?>
 
2
<openerp>
 
3
  <data>
 
4
    <!-- 列表视图 -->
 
5
    <record model="ir.ui.view" id="view_contract_tree">
 
6
      <field name="name">合同列表</field>
 
7
      <field name="model">contract</field>
 
8
      <field name="priority">8</field>
 
9
      <field name="type">tree</field>
 
10
      <field name="arch" type="xml">
 
11
        <tree string="合同列表">
 
12
                    <field name="contractNo" select="1"/>
 
13
          <field name="name" select="1" />
 
14
          <field name="partyA" select="2"/>
 
15
          <field name="partyB" select="2"/>
 
16
          <field name="amount" select="2"/>
 
17
          <field name="type"  select="1" required="True"/>
 
18
          <field name="state"  select="1" required="True"/>
 
19
        </tree>
 
20
      </field>
 
21
    </record>
 
22
    <!-- 表单视图 -->
 
23
    <record model="ir.ui.view" id="view_contract_form">
 
24
      <field name="name">合同表单</field>
 
25
      <field name="model">contract</field>
 
26
      <field name="priority">3</field>
 
27
      <field name="type">form</field>
 
28
      <field name="arch" type="xml">
 
29
        <form string="合同表单">
 
30
          <field name="contractNo" required="True" attrs="{'readonly':[('state','!=','draft')]}"/>
 
31
          <field name="name" required="True" attrs="{'readonly':[('state','!=','draft')]}"/>          
 
32
          <field name="partyA" required="True" attrs="{'readonly':[('state','!=','draft')]}"/>
 
33
          <field name="partyB" required="True" attrs="{'readonly':[('state','!=','draft')]}"/>
 
34
          <field name="amount" digits="(14, 3)" required="True" attrs="{'readonly':[('state','!=','draft')]}"/>
 
35
          <field name="type" attrs="{'readonly':1}"/>
 
36
          <group colspan="4">
 
37
          <field name="contents" attrs="{'readonly':[('state','!=','draft')]}"/>
 
38
          </group>
 
39
          <field name="startDate" required="True" attrs="{'readonly':[('state','!=','draft')]}"/>
 
40
          <field name="endDate" required="True" attrs="{'readonly':[('state','!=','draft')]}"/>
 
41
          <newline/>
 
42
          <field name="proposer" readonly="True"/>
 
43
          <field name="auditor" readonly="True"/>
 
44
          <newline/>
 
45
          <separator colspan="4" string="审批流程"/>
 
46
          <group colspan="4" col="6">
 
47
                  <field name="state" readonly="1" />
 
48
                  <button string="申请" states="draft" name="action_toprove"/>
 
49
                  <button string="签署" states="wait_prove" name="action_prove"/>
 
50
                  <button string="作废" states="wait_prove" name="action_reject"/>
 
51
          </group>
 
52
        </form>
 
53
      </field>
 
54
    </record>
 
55
 
 
56
 
 
57
 
 
58
    <!-- 销售合同 -->
 
59
    <record id="action_contract_sale" model="ir.actions.act_window">
 
60
        <field name="name">销售合同</field>
 
61
        <field name="res_model">contract</field>
 
62
        <field name="domain">[('type','=','sale'),('proposer.user_id','=',uid)]</field>
 
63
        <field name="context">{'default_type':'sale', 'search_default_type':1}</field>
 
64
        <field name="help">对企业的销售合同进行管理</field>
 
65
    </record>
 
66
    <menuitem name="销售合同" id="menu_contract_sale" parent="base.menu_sales" action="action_contract_sale"/>
 
67
 
 
68
    <!-- 采购合同 -->
 
69
    <record id="action_contract_purchase" model="ir.actions.act_window">
 
70
        <field name="name">采购合同</field>
 
71
        <field name="res_model">contract</field>
 
72
        <field name="domain">[('type','=','purchase'),('proposer.user_id','=',uid)]</field>
 
73
        <field name="context">{'default_type':'purchase', 'search_default_type':1}</field>
 
74
        <field name="help">对企业的采购合同进行管理</field>
 
75
    </record>
 
76
    <menuitem name="采购合同" id="menu_contract_purchase" parent="purchase.menu_procurement_management" action="action_contract_purchase"/>
 
77
 
 
78
  </data>
 
79
</openerp>