← Back to team overview

openerp-community-reviewer team mailing list archive

[Merge] lp:~initos.com/contract-management/7.0 into lp:contract-management

 

Markus Schneider has proposed merging lp:~initos.com/contract-management/7.0 into lp:contract-management.

Requested reviews:
  Contract Management Core Editors (contract-management-core-editors)

For more details, see:
https://code.launchpad.net/~initos.com/contract-management/7.0/+merge/195243

migrate acy_account_analytic_lines from lp:acysos/openerp-addons-6.0 to OpenERP 7
this modul fits this branch
-- 
https://code.launchpad.net/~initos.com/contract-management/7.0/+merge/195243
Your team OpenERP Community Reviewer/Maintainer is subscribed to branch lp:contract-management.
=== added directory 'account_analytic_line_list'
=== added file 'account_analytic_line_list/__init__.py'
--- account_analytic_line_list/__init__.py	1970-01-01 00:00:00 +0000
+++ account_analytic_line_list/__init__.py	2013-11-14 15:26:47 +0000
@@ -0,0 +1,22 @@
+# -*- encoding: utf-8 -*-
+##############################################################################
+#
+#    OpenERP, Open Source Management Solution
+#    Copyright (c) 2013 Markus SChneider <markus.schneider@xxxxxxxxxx>
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU 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 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/>.
+#
+##############################################################################
+
+from . import wizard

=== added file 'account_analytic_line_list/__openerp__.py'
--- account_analytic_line_list/__openerp__.py	1970-01-01 00:00:00 +0000
+++ account_analytic_line_list/__openerp__.py	2013-11-14 15:26:47 +0000
@@ -0,0 +1,42 @@
+# -*- encoding: utf-8 -*-
+##############################################################################
+#
+#    OpenERP, Open Source Management Solution
+#    Copyright (c) 2011 Acysos S.L. (http://acysos.com) All Rights Reserved.
+#                       Ignacio Ibeas <ignacio@xxxxxxxxxx>
+#                  2013 Markus SChneider <markus.schneider@xxxxxxxxxx>
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU 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 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": "Account Analytic Line List",
+    "version": "1.1",
+    "author": "initOS GmbH & Co. KG",
+    "website": "www.initos.com",
+    "category": "Generic Modules/Projects & Services",
+    "description": """Search the analytic lines for an analytic account and all their children.
+    ported module acy_account_analytic_lines from Acysos S.L. (Sponsored by Talleres Mutilva)""",
+    "license": "AGPL-3",
+    "depends": [
+        "base",
+        "account",
+        "analytic"
+        ],
+    "data": ["wizard/account_analytic_line.xml"],
+    "demo": [],
+    "active": False,
+    "installable": True
+}

=== added directory 'account_analytic_line_list/i18n'
=== added file 'account_analytic_line_list/i18n/acy_account_analytic_lines.pot'
--- account_analytic_line_list/i18n/acy_account_analytic_lines.pot	1970-01-01 00:00:00 +0000
+++ account_analytic_line_list/i18n/acy_account_analytic_lines.pot	2013-11-14 15:26:47 +0000
@@ -0,0 +1,45 @@
+# Translation of OpenERP Server.
+# This file contains the translation of the following modules:
+#   * acy_account_analytic_lines
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: OpenERP Server 6.0.3\n"
+"Report-Msgid-Bugs-To: support@xxxxxxxxxxx\n"
+"POT-Creation-Date: 2011-20-10 01:31:24+0000\n"
+"PO-Revision-Date: 2011-20-10 01:31:24+0000\n"
+"Last-Translator: <>\n"
+"Language-Team: \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: \n"
+"Plural-Forms: \n"
+
+#. module: acy_account_analytic_lines
+#: field:account.analytic.view.line,analytic_id:0
+msgid "Analytic Account"
+msgstr ""
+
+#. module: acy_account_analytic_lines
+#: field:account.analytic.view.line,children:0
+msgid "With children"
+msgstr ""
+
+#. module: acy_account_analytic_lines
+#: model:ir.actions.act_window,name:account_analytic_view_line.action_view_account_analytic_lines
+#: model:ir.ui.menu,name:acy_account_analytic_lines.menu_view_account_analytic_lines
+#: view:account.analytic.view.line:0
+msgid "Analytic account lines"
+msgstr ""
+
+#. module: acy_account_analytic_lines
+#: view:account.analytic.view.line:0
+msgid "Open Lines"
+msgstr ""
+
+#. module: acy_account_analytic_lines
+#: view:account.analytic.view.line:0
+msgid "Cancel"
+msgstr ""
+
+

=== added file 'account_analytic_line_list/i18n/es.po'
--- account_analytic_line_list/i18n/es.po	1970-01-01 00:00:00 +0000
+++ account_analytic_line_list/i18n/es.po	2013-11-14 15:26:47 +0000
@@ -0,0 +1,43 @@
+# Translation of OpenERP Server.
+# This file contains the translation of the following modules:
+#   * acy_account_analytic_lines
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: OpenERP Server 6.0.3\n"
+"Report-Msgid-Bugs-To: support@xxxxxxxxxxx\n"
+"POT-Creation-Date: 2011-20-10 01:31:24+0000\n"
+"PO-Revision-Date: 2011-20-10 01:31:24+0000\n"
+"Last-Translator: <>\n"
+"Language-Team: \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: \n"
+"Plural-Forms: \n"
+
+#. module: acy_account_analytic_lines
+#: field:account.analytic.view.line,analytic_id:0
+msgid "Analytic Account"
+msgstr "Cuenta analítica"
+
+#. module: acy_account_analytic_lines
+#: field:account.analytic.view.line,children:0
+msgid "With children"
+msgstr "Con subcuentas"
+
+#. module: acy_account_analytic_lines
+#: model:ir.actions.act_window,name:account_analytic_view_line.action_view_account_analytic_lines
+#: model:ir.ui.menu,name:acy_account_analytic_lines.menu_view_account_analytic_lines
+#: view:account.analytic.view.line:0
+msgid "Analytic account lines"
+msgstr "Apuntes por cuenta analítica"
+
+#. module: acy_account_analytic_lines
+#: view:account.analytic.view.line:0
+msgid "Open Lines"
+msgstr "Abrir apuntes"
+
+#. module: acy_account_analytic_lines
+#: view:account.analytic.view.line:0
+msgid "Cancel"
+msgstr "Cancelar"
\ No newline at end of file

=== added directory 'account_analytic_line_list/wizard'
=== added file 'account_analytic_line_list/wizard/__init__.py'
--- account_analytic_line_list/wizard/__init__.py	1970-01-01 00:00:00 +0000
+++ account_analytic_line_list/wizard/__init__.py	2013-11-14 15:26:47 +0000
@@ -0,0 +1,24 @@
+# -*- encoding: utf-8 -*-
+##############################################################################
+#
+#    OpenERP, Open Source Management Solution
+#    Copyright (c) 2011 Acysos S.L. (http://acysos.com) All Rights Reserved.
+#                       Ignacio Ibeas <ignacio@xxxxxxxxxx>
+#                  2013 Markus SChneider <markus.schneider@xxxxxxxxxx>
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU 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 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/>.
+#
+##############################################################################
+
+from . import account_analytic_line

=== added file 'account_analytic_line_list/wizard/account_analytic_line.py'
--- account_analytic_line_list/wizard/account_analytic_line.py	1970-01-01 00:00:00 +0000
+++ account_analytic_line_list/wizard/account_analytic_line.py	2013-11-14 15:26:47 +0000
@@ -0,0 +1,60 @@
+# -*- encoding: utf-8 -*-
+##############################################################################
+#
+#    OpenERP, Open Source Management Solution
+#    Copyright (c) 2011 Acysos S.L. (http://acysos.com) All Rights Reserved.
+#                       Ignacio Ibeas <ignacio@xxxxxxxxxx>
+#                  2013 Markus SChneider <markus.schneider@xxxxxxxxxx>
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU 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 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/>.
+#
+##############################################################################
+from openerp.osv import orm, fields
+
+
+class AccountAnalyticViewLine(orm.TransientModel):
+    _name = "account.analytic.view.line"
+    _description = "Account Analytic View Line"
+
+    _columns = {
+        'analytic_id': fields.many2one('account.analytic.account', 'Analytic Account', required=True),
+        'children': fields.boolean('With children'),
+    }
+
+    def _append_childs(self, cr, uid, accounts, analytic_obj):
+        for child in analytic_obj.child_complete_ids:
+                accounts.append(child.id)
+                self._append_childs(cr, uid, accounts, child)
+
+    def open_account_analytic_lines(self, cr, uid, ids, context=None):
+        data = self.read(cr, uid, ids, [], context=context)[0]
+        print data['analytic_id'][0]
+        analytic_obj = self.pool.get('account.analytic.account').browse(cr, uid, [data['analytic_id'][0]])[0]
+        accounts = []
+        accounts.append(analytic_obj.id)
+        print analytic_obj.id
+        if data['children'] == 1:
+            self._append_childs(cr, uid, accounts, analytic_obj)
+        print accounts
+        res = {
+            'domain': str([('account_id', 'in', accounts)]),
+            'name': 'Analytic account lines',
+            'view_type': 'form',
+            'view_mode': 'tree,form',
+            'res_model': 'account.analytic.line',
+            'view_id': False,
+            'type': 'ir.actions.act_window',
+            'context': {'search_default_to_invoice': 1},
+        }
+        return res

=== added file 'account_analytic_line_list/wizard/account_analytic_line.xml'
--- account_analytic_line_list/wizard/account_analytic_line.xml	1970-01-01 00:00:00 +0000
+++ account_analytic_line_list/wizard/account_analytic_line.xml	2013-11-14 15:26:47 +0000
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="utf-8"?>
+<openerp>
+    <data>
+        
+        <record id="view_account_analytic_lines" model="ir.ui.view">
+            <field name="name">view.account.analytic.lines.form</field>
+            <field name="model">account.analytic.view.line</field>
+            <field name="type">form</field>
+            <field name="arch" type="xml">
+                <form string="Analytic account lines">
+                    <group colspan="4">
+                        <field name="analytic_id" />
+                        <field name="children"/>
+                    </group>
+                    <separator string="" colspan="4"/>
+                    <group colspan="4" col="6">
+                        <button icon="gtk-cancel" special="cancel" string="Cancel"/>
+                        <button icon="terp-gtk-go-back-rtl" string="Open Lines" name="open_account_analytic_lines" type="object"/>
+                    </group>
+                </form>
+            </field>
+        </record>
+
+        <record id="action_view_account_analytic_lines" model="ir.actions.act_window">
+            <field name="name">Analytic account lines</field>
+            <field name="type">ir.actions.act_window</field>
+            <field name="res_model">account.analytic.view.line</field>
+            <field name="view_type">form</field>
+            <field name="view_mode">form</field>
+            <field name="target">new</field>
+        </record>
+        
+        <menuitem
+                name="Analytic account lines"
+                action="action_view_account_analytic_lines"
+                id="menu_view_account_analytic_lines"
+                parent="account.next_id_40"
+                sequence="2"
+            icon="STOCK_INDENT"/>
+        
+    </data>
+</openerp>
\ No newline at end of file


Follow ups