Jelajahi Sumber

commit incial

Rodney Enciso Arias 8 tahun lalu
melakukan
b26b4c322e
11 mengubah file dengan 218 tambahan dan 0 penghapusan
  1. 4 0
      README.rst
  2. 25 0
      __init__.py
  3. TEMPAT SAMPAH
      __init__.pyc
  4. 48 0
      __openerp__.py
  5. 17 0
      hr_payslip_view.xml
  6. 20 0
      hr_payslip_workflow.xml
  7. 22 0
      i18n/es.po
  8. 22 0
      i18n/es_MX.po
  9. TEMPAT SAMPAH
      static/description/icon.png
  10. 52 0
      static/description/index.html
  11. 8 0
      test/update_payroll_workflow.yml

+ 4 - 0
README.rst

@@ -0,0 +1,4 @@
+Hr Payroll Cancel
+=================
+
+This module change the workflow from hr.payslip to can cancel after to confirm this

+ 25 - 0
__init__.py

@@ -0,0 +1,25 @@
+# coding: utf-8
+###########################################################################
+#    Module Writen to OpenERP, Open Source Management Solution
+#
+#    Copyright (c) 2014 Vauxoo - http://www.vauxoo.com/
+#    All Rights Reserved.
+#    info Vauxoo (info@vauxoo.com)
+############################################################################
+#    Coded by: Luis Torres (luis_t@vauxoo.com)
+############################################################################
+#
+#    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/>.
+#
+##############################################################################

TEMPAT SAMPAH
__init__.pyc


+ 48 - 0
__openerp__.py

@@ -0,0 +1,48 @@
+# coding: utf-8
+###########################################################################
+#    Module Writen to OpenERP, Open Source Management Solution
+#
+#    Copyright (c) 2014 Vauxoo - http://www.vauxoo.com/
+#    All Rights Reserved.
+#    info Vauxoo (info@vauxoo.com)
+############################################################################
+#    Coded by: Luis Torres (luis_t@vauxoo.com)
+############################################################################
+#
+#    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": "Hr Payroll Cancel",
+    "version": "1.6",
+    "author": "Vauxoo",
+    "category": "Localization/Mexico",
+    "website": "http://www.vauxoo.com/",
+    "license": "AGPL-3",
+    "depends": [
+        "hr_payroll"
+    ],
+    "demo": [],
+    "data": [
+        "hr_payslip_view.xml",
+        "hr_payslip_workflow.xml",
+        "test/update_payroll_workflow.yml"
+    ],
+    "test": [],
+    "js": [],
+    "css": [],
+    "qweb": [],
+    "installable": True,
+    "auto_install": False,
+}

+ 17 - 0
hr_payslip_view.xml

@@ -0,0 +1,17 @@
+<?xml version='1.0' encoding='utf-8'?>
+<openerp>
+    <data>
+
+        <record id="view_cancel_payslip_form" model="ir.ui.view">
+                <field name="name">view.cancel.payslip.form</field>
+                <field name="model">hr.payslip</field>     
+                <field name="inherit_id" ref="hr_payroll.view_hr_payslip_form"/>
+                <field name="arch" type="xml">
+                    <xpath expr="//button[@string='Cancel Payslip']" position="attributes">
+                        <attribute name="states">draft,hr_check,confirm,verify,done</attribute>
+                    </xpath>
+                </field>
+        </record>
+
+    </data>
+</openerp>

+ 20 - 0
hr_payslip_workflow.xml

@@ -0,0 +1,20 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<openerp>
+    <data>
+        <record id="hr_payroll.act_done" model="workflow.activity">
+            <field name="wkf_id" ref="hr_payroll.wkf"/>
+            <field name="name">done</field>
+            <field name="action">process_sheet()</field>
+            <field name="kind">function</field>
+            <field name="flow_stop"/>
+        </record>
+        
+        <record id="workflow_transition_act_done_to_act_cancel" model="workflow.transition">
+            <field name="signal">cancel_sheet</field>
+            <field name="act_from" ref="hr_payroll.act_done"/>
+            <field name="act_to" ref="hr_payroll.act_cancel"/>
+            <field name="condition">True</field>
+        </record>
+        
+    </data>
+</openerp>

+ 22 - 0
i18n/es.po

@@ -0,0 +1,22 @@
+# Translation of OpenERP Server.
+# This file contains the translation of the following modules:
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: OpenERP Server 7.0\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2014-07-04 17:34+0000\n"
+"PO-Revision-Date: 2015-08-03 16:07+0200\n"
+"Last-Translator: <>\n"
+"Language-Team: \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: \n"
+"Language: es\n"
+"X-Generator: Poedit 1.8.2\n"
+
+#. module: hr_payroll_cancel
+#: view:hr.payslip:0
+msgid "draft,hr_check,confirm,verify,done"
+msgstr "draft,hr_check,confirm,verify,done"

+ 22 - 0
i18n/es_MX.po

@@ -0,0 +1,22 @@
+# Translation of OpenERP Server.
+# This file contains the translation of the following modules:
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: OpenERP Server 7.0\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2014-07-04 17:34+0000\n"
+"PO-Revision-Date: 2015-08-03 16:07+0200\n"
+"Last-Translator: <>\n"
+"Language-Team: \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: \n"
+"Language: es_MX\n"
+"X-Generator: Poedit 1.8.2\n"
+
+#. module: hr_payroll_cancel
+#: view:hr.payslip:0
+msgid "draft,hr_check,confirm,verify,done"
+msgstr "draft,hr_check,confirm,verify,done"

TEMPAT SAMPAH
static/description/icon.png


+ 52 - 0
static/description/index.html

@@ -0,0 +1,52 @@
+<head>
+  <style>
+      .backgrounds{background-color:#fff;color:#a41d35}
+  </style>
+</head>
+<section class="oe_container">
+ <div class="oe_row oe_spaced">
+  <h2 class="oe_slogan">
+   Hr Payroll Cancel
+  </h2>
+  <p class="oe_mt32">
+   This module change the workflow from hr.payslip to can cancel after to confirm this
+  </p>
+ </div>
+</section>
+<section class="oe_container">
+    <div class="oe_row oe_spaced">
+        <div class="oe_span6">
+            <h2 class="oe_slogan">Do you need help?</h2>
+            <h3 class="oe_slogan">
+                Let's offer you the best services!
+            </h3>
+            <p class="oe_mt32 text-center">
+                Contact us by our official channels.
+            </p>
+            <div class="oe_spaced">
+                <ul class="text-center list-inline">
+                    <li>
+                        <a href="https://facebook.com/vauxoo" Target="_blank"><i class="fa fa-facebook-square fa-xs backgrounds"></i></a>
+                    </li>
+                    <li>
+                        <a href="https://twitter.com/vauxoo" Target="_blank" ><i class="fa fa-twitter-square fa-xs backgrounds"></i></a>
+                    </li>
+                    <li>
+                        <a href="https://www.linkedin.com/company/vauxoo" Target="_blank"><i class="fa fa-linkedin-square fa-xs backgrounds"></i></a>
+                    </li>
+                    <li>
+                        <a title="Contact us" data-toggle="tooltip" data-placement="left" Target="_blank" href="https://www.vauxoo.com/page/website.contactus"><i class="fa fa-envelope-square fa-xs backgrounds"></i></a>
+                    </li>
+                </ul>
+            </div>
+        </div>
+        <div class="oe_span6">
+            <div class="oe_demo oe_picture oe_screenshot">
+                <a href="https://www.vauxoo.com"  target="_blank"r>
+                    <img src="https://s3.amazonaws.com/s3.vauxoo.com/description_logo.png" width="200" height="auto">
+                </a>
+                <div class="oe_demo_footer oe_centeralign">Meet Us</div>
+            </div>
+        </div>
+    </div>
+</section>

+ 8 - 0
test/update_payroll_workflow.yml

@@ -0,0 +1,8 @@
+-
+  Workflow Mexican Electronic Payroll
+-
+  !python {model: hr.payslip}: |
+    cr.execute("""UPDATE wkf_instance
+                SET state = 'active'
+                WHERE state = 'complete' and wkf_id = (SELECT id FROM wkf WHERE name = 'hr.payslip.basic')
+                AND res_id IN (SELECT id FROM hr_payslip WHERE state = 'done')""")