浏览代码

[ADD] odoo management workflow

robert 6 年之前
父节点
当前提交
3dff6b1265
共有 3 个文件被更改,包括 14 次插入3 次删除
  1. 2 1
      __openerp__.py
  2. 2 2
      templates.xml
  3. 10 0
      workflow.xml

+ 2 - 1
__openerp__.py

@@ -9,6 +9,7 @@
         'web'
     ],
     'data': [
-        'templates.xml'
+        'templates.xml',
+        'workflow.xml'
     ]
 }

+ 2 - 2
templates.xml

@@ -41,7 +41,7 @@
                                 string="Activar"
                                 type="object"
                                 class="oe_highlight"
-                                modifiers="{'invisible': [('state', 'not in', ['draft', 'suspended'])]}" />
+                                modifiers="{'invisible': ['|', ('id', '=', False), ('state', 'not in', ['draft', 'suspended'])]}" />
                         <button
                                 name="action_suspend"
                                 states="activated"
@@ -60,7 +60,7 @@
                                 name="state"
                                 widget="statusbar"
                                 statusbar="draft,activated,disapproved,suspended,destroyed"
-                                statusbar_colors='{"activated":"blue", "destroyed": "red"}' />
+                                statusbar_colors="{'activated':'blue','destroyed':'red'}" />
                     </header>
                     <sheet>
                         <div class="oe_button_box oe_right">

+ 10 - 0
workflow.xml

@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<openerp>
+    <data>
+        <record id="wkf_system_instance" model="workflow">
+            <field name="name">wkf.system.instance</field>
+            <field name="osv">system.instance</field>
+            <field name="on_create">True</field>
+        </record>
+    </data>
+</openerp>