Skip to content

Commit

Permalink
[CLEAN] proto document change
Browse files Browse the repository at this point in the history
[email protected] committed Dec 20, 2011

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
1 parent f51d7b1 commit 0438583
Showing 14 changed files with 1,332 additions and 0 deletions.
25 changes: 25 additions & 0 deletions document_change_proto/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
import document_change_config
import document_change
#import document_change_report


57 changes: 57 additions & 0 deletions document_change_proto/__openerp__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################


{
'name': 'Integrated Document Management System',
'version': '1.99',
'category': 'Generic Modules/Others',
'description': """
The document_change module allows to track and manage process changes to
update documents in directories, and keep track of these updates. You
can define control points, phase of changes. This module has been
developed for Caterpillar Belgium.
""",
'author': 'Tiny',
'website': 'http://www.openerp.com',
'depends': ['base', 'document_ftp','board'],
'init_xml': [
'data/document_change_data.xml'
],
'update_xml': [
#'security/document_process_security.xml',
'view/document_change.xml',
'view/document_change_config.xml',
'data/document_change_sequence.xml',
'data/document_process_workflow.xml',
'data/directory_types.xml'
#'document_change_report_view.xml',
#'document_phase_workflow.xml',
#'document_process_workflow.xml',
#'cat_demo.xml'
],
'demo_xml': [ ],
'installable': True,
'active': False,
'certificate': None,
}

# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
6 changes: 6 additions & 0 deletions document_change_proto/cat_demo.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?xml version="1.0"?>
<openerp>
<data>

</data>
</openerp>
38 changes: 38 additions & 0 deletions document_change_proto/data/directory_types.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
<?xml version="1.0" ?>
<openerp>
<data>
<record id="document_directory_type_history0" model="document.directory.type">
<field name="name">History</field>
</record>
</data>
<data>
<record id="document_directory_type_building0" model="document.directory.type">
<field name="name">Building</field>
</record>
</data>
<data>
<record id="document_directory_type_factory0" model="document.directory.type">
<field name="name">Factory</field>
</record>
</data>
<data>
<record id="document_directory_type_sectionmq0" model="document.directory.type">
<field name="name">Section MQ</field>
</record>
</data>
<data>
<record id="document_directory_type_section0" model="document.directory.type">
<field name="name">Section</field>
</record>
</data>
<data>
<record id="document_directory_type_workstation0" model="document.directory.type">
<field name="name">Work Station</field>
</record>
</data>
<data>
<record id="document_directory_type_familly0" model="document.directory.type">
<field name="name">Familly</field>
</record>
</data>
</openerp>
160 changes: 160 additions & 0 deletions document_change_proto/data/document_change_data.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,160 @@
<?xml version="1.0"?>
<openerp>
<data noupdate="1">

<!-- Structure Data -->
<record model="document.directory" id="dir_root">
<field name="name">Bat E</field>
<field name="parent_id" eval="False"/>
</record>
<record model="document.directory" id="dir_bat_e">
<field name="name">Commodity A</field>
<field name="parent_id" ref="dir_root"/>
</record>
<record model="document.directory" id="dir_bat_z">
<field name="name">Commodity B</field>
<field name="parent_id" ref="dir_root"/>
</record>

<record model="document.directory" id="dir_mq_section">
<field name="name">MQ Section</field>
<field name="parent_id" ref="dir_bat_e"/>
</record>

<record model="document.directory" id="dir_section_x">
<field name="name">Section X</field>
<field name="parent_id" ref="dir_mq_section"/>
</record>
<record model="document.directory" id="dir_section_y">
<field name="name">Section Y</field>
<field name="parent_id" ref="dir_mq_section"/>
</record>

<record model="document.directory" id="dir_ws_1bc">
<field name="name">Work Station 1BC</field>
<field name="parent_id" ref="dir_section_x"/>
</record>
<record model="document.directory" id="dir_ws_2bc">
<field name="name">Work Station 2BC</field>
<field name="parent_id" ref="dir_section_x"/>
</record>
<record model="document.directory" id="dir_ws_3bc">
<field name="name">Work Station 3BC</field>
<field name="parent_id" ref="dir_section_y"/>
</record>

<record model="document.directory" id="dir_family1">
<field name="name">Family 1</field>
<field name="parent_id" ref="dir_ws_1bc"/>
</record>
<record model="document.directory" id="dir_family2">
<field name="name">Family 2</field>
<field name="parent_id" ref="dir_ws_1bc"/>
</record>
<record model="document.directory" id="dir_family3">
<field name="name">Family 3</field>
<field name="parent_id" ref="dir_ws_2bc"/>
</record>
<record model="document.directory" id="dir_family4">
<field name="name">Family 4</field>
<field name="parent_id" ref="dir_ws_3bc"/>
</record>

<record model="document.directory" id="dir_vsm">
<field name="name">MQ Section 2</field>
<field name="parent_id" ref="dir_bat_z"/>
</record>
<record model="document.directory" id="dir_takt_time">
<field name="name">MQ Section 3</field>
<field name="parent_id" ref="dir_bat_z"/>
</record>

<record model="document.directory" id="dir_template">
<field name="name">Templates</field>
<field name="parent_id" ref="dir_root"/>
</record>

<!-- Document Templates -->
<record model="ir.attachment" id="doc_FIE_template">
<field name="name">FIE_template</field>
<field name="datas_fname">FIE_template.xls</field>
<field name="parent_id" ref="dir_template"/>
</record>
<record model="ir.attachment" id="doc_SFMEA_template">
<field name="name">SFMEA_template</field>
<field name="datas_fname">SFMEA_template.xls</field>
<field name="parent_id" ref="dir_template"/>
</record>
<record model="ir.attachment" id="doc_ProjectCharter_Template">
<field name="name">ProjectCharter_Template</field>
<field name="datas_fname">ProjectCharter_Template.ppt</field>
<field name="parent_id" ref="dir_template"/>
</record>
<record model="ir.attachment" id="doc_TaktTime_template">
<field name="name">TaktTime_template</field>
<field name="datas_fname">TaktTime_template.xls</field>
<field name="parent_id" ref="dir_template"/>
</record>

<!-- Document Change Types -->
<record model="document.change.type" id="type_project_charter">
<field name="name">Project Charter</field>
<field name="template_document_id" ref="doc_ProjectCharter_Template"/>
</record>
<record model="document.change.type" id="type_vsm">
<field name="name">VSM</field>
</record>
<record model="document.change.type" id="type_takt_time">
<field name="name">Takt Time</field>
<field name="template_document_id" ref="doc_TaktTime_template"/>
</record>
<record model="document.change.type" id="type_FIE">
<field name="name">FIE</field>
<field name="template_document_id" ref="doc_FIE_template"/>
</record>
<record model="document.change.type" id="type_SFMEA">
<field name="name">SFMEA</field>
<field name="template_document_id" ref="doc_SFMEA_template"/>
</record>

<!-- Documents -->
<record model="ir.attachment" id="doc_FIE_05466_001">
<field name="name">FIE_05466_001</field>
<field name="datas_fname">FIE_05466_001.xls</field>
<field name="parent_id" ref="dir_family1"/>
<field name="change_type_id" ref="type_FIE"/>
</record>
<record model="ir.attachment" id="doc_SFMEA_0581_001">
<field name="name">SFMEA_0581_001</field>
<field name="datas_fname">SFMEA_0581_001.xls</field>
<field name="parent_id" ref="dir_family1"/>
<field name="change_type_id" ref="type_SFMEA"/>
</record>
<record model="ir.attachment" id="doc_SFMEA_0581_002">
<field name="name">SFMEA_0581_002</field>
<field name="datas_fname">SFMEA_0581_002.xls</field>
<field name="parent_id" ref="dir_family2"/>
<field name="change_type_id" ref="type_SFMEA"/>
</record>
<record model="ir.attachment" id="doc_TaktTime_0549">
<field name="name">TaktTime_0549</field>
<field name="datas_fname">TaktTime_0549.xls</field>
<field name="parent_id" ref="dir_takt_time"/>
<field name="change_type_id" ref="type_takt_time"/>
</record>

<!-- Process Types -->
<record model="document.change.process.type" id="process_quality_alert">
<field name="name">Quality Alert</field>
</record>
<record model="document.change.process.type" id="process_new_product">
<field name="name">New Product</field>
</record>
<record model="document.change.process.type" id="process_red_risk">
<field name="name">Red Risk</field>
</record>
<record model="document.change.process.type" id="process_ci_card">
<field name="name">CI Card</field>
</record>
</data>
</openerp>
17 changes: 17 additions & 0 deletions document_change_proto/data/document_change_sequence.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8" ?>
<openerp>
<data>
<record id="seq_type_document_change_process" model="ir.sequence.type">
<field name="name">Document Change Process</field>
<field name="code">document.change.process</field>
</record>

<record model="ir.sequence" id="seq_document_change_process">
<field name="name">Document Change Process</field>
<field name="code">document.change.process</field>
<field name="prefix">PC</field>
<field name="padding">5</field>
</record>
</data>
</openerp>

68 changes: 68 additions & 0 deletions document_change_proto/data/document_process_workflow.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<record id="wkf_change_process" model="workflow">
<field name="name">document.change.process.basic</field>
<field name="osv">document.change.process</field>
<field name="on_create">True</field>
</record>

<!-- States -->
<record id="act_process_draft" model="workflow.activity">
<field name="wkf_id" ref="wkf_change_process"/>
<field name="flow_start">True</field>
<field name="name">draft</field>
</record>
<record id="act_process_in_progress" model="workflow.activity">
<field name="wkf_id" ref="wkf_change_process"/>
<field name="name">in_progress</field>
<field name="action">do_start()</field>
<field name="kind">function</field>
</record>
<record id="act_process_pending" model="workflow.activity">
<field name="wkf_id" ref="wkf_change_process"/>
<field name="name">pending</field>
<field name="action">do_pending()</field>
<field name="kind">function</field>
</record>
<record id="act_process_confirm" model="workflow.activity">
<field name="wkf_id" ref="wkf_change_process"/>
<field name="name">to_validate</field>
<field name="action">do_confirm()</field>
<field name="kind">function</field>
</record>
<record id="act_process_done" model="workflow.activity">
<field name="wkf_id" ref="wkf_change_process"/>
<field name="name">done</field>
<field name="action">do_done()</field>
<field name="kind">function</field>
</record>

<!-- Transitions -->
<record id="tran_process_draft_to_progress" model="workflow.transition">
<field name="act_from" ref="act_process_draft"/>
<field name="act_to" ref="act_process_in_progress"/>
<field name="signal">button_start</field>
</record>
<record id="tran_process_progress_to_pending" model="workflow.transition">
<field name="act_from" ref="act_process_in_progress"/>
<field name="act_to" ref="act_process_pending"/>
<field name="signal">button_pending</field>
</record>
<record id="tran_process_pending_to_progress" model="workflow.transition">
<field name="act_from" ref="act_process_pending"/>
<field name="act_to" ref="act_process_in_progress"/>
<field name="signal">button_start</field>
</record>
<record id="tran_process_progress_to_confirm" model="workflow.transition">
<field name="act_from" ref="act_process_in_progress"/>
<field name="act_to" ref="act_process_confirm"/>
<field name="signal">button_confirm</field>
</record>
<record id="tran_process_confirm_to_end" model="workflow.transition">
<field name="act_from" ref="act_process_confirm"/>
<field name="act_to" ref="act_process_done"/>
<field name="signal">button_done</field>
</record>
</data>
</openerp>
Loading

0 comments on commit 0438583

Please sign in to comment.