Merge lp:~vauxoo/addons-vauxoo/7.0-journal_items_configure_wizard-dev-ernesto into lp:addons-vauxoo/7.0

Status: Needs review
Proposed branch: lp:~vauxoo/addons-vauxoo/7.0-journal_items_configure_wizard-dev-ernesto
Merge into: lp:addons-vauxoo/7.0
Diff against target: 265 lines (+232/-0)
6 files modified
journal_items_configure_wizard/__init__.py (+26/-0)
journal_items_configure_wizard/__openerp__.py (+48/-0)
journal_items_configure_wizard/i18n/es.po (+53/-0)
journal_items_configure_wizard/wizard/__init__.py (+26/-0)
journal_items_configure_wizard/wizard/move_lines.py (+45/-0)
journal_items_configure_wizard/wizard/move_lines_wiz_view.xml (+34/-0)
To merge this branch: bzr merge lp:~vauxoo/addons-vauxoo/7.0-journal_items_configure_wizard-dev-ernesto
Reviewer Review Type Date Requested Status
Luis Ernesto García Medina - http://www.vauxoo.com Needs Resubmitting
Isaac López Zúñiga Pending
Julio Serna-http://www.vauxoo.com Pending
Moisés López - http://www.vauxoo.com Pending
Review via email: mp+179515@code.launchpad.net

Description of the change

Se creo wizard que busca en los account_move_line el texto "THIS ACCOUNT HAD NEGATIVE VALUES" y cambia los debit por los credit e inversamente después valida las pólizas de estos movimientos

To post a comment you must log in.
719. By Luis Ernesto García Medina - http://www.vauxoo.com

[FIX][journal_items_configure_wizard] changed description of module and fix error with write of account_move_line (needed a list)

Revision history for this message
Luis Ernesto García Medina - http://www.vauxoo.com (ernesto-gm) wrote :

Listo Isaac se soluciono el error al momento de cambiar los debe por los haber y también se agrego la descripción del modulo, hice una pruebas con el respaldo que me pasaste de bioderpac

review: Needs Resubmitting

Unmerged revisions

719. By Luis Ernesto García Medina - http://www.vauxoo.com

[FIX][journal_items_configure_wizard] changed description of module and fix error with write of account_move_line (needed a list)

718. By Luis Ernesto García Medina - http://www.vauxoo.com

[ADD][journal_items_configure_wizard] this module Fix journal items with message "THIS ACCOUNT HAD NEGATIVE VALUES" and invert debit-credit, and validate journal items with this journal items

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== added directory 'journal_items_configure_wizard'
=== added file 'journal_items_configure_wizard/__init__.py'
--- journal_items_configure_wizard/__init__.py 1970-01-01 00:00:00 +0000
+++ journal_items_configure_wizard/__init__.py 2013-09-03 23:31:15 +0000
@@ -0,0 +1,26 @@
1# -*- encoding: utf-8 -*-
2###########################################################################
3# Module Writen to OpenERP, Open Source Management Solution
4#
5# Copyright (c) 2010 Vauxoo - http://www.vauxoo.com/
6# All Rights Reserved.
7# info Vauxoo (info@vauxoo.com)
8############################################################################
9# Coded by: Luis Ernesto García Medina (ernesto_gm@vauxoo.com)
10############################################################################
11#
12# This program is free software: you can redistribute it and/or modify
13# it under the terms of the GNU Affero General Public License as
14# published by the Free Software Foundation, either version 3 of the
15# License, or (at your option) any later version.
16#
17# This program is distributed in the hope that it will be useful,
18# but WITHOUT ANY WARRANTY; without even the implied warranty of
19# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20# GNU Affero General Public License for more details.
21#
22# You should have received a copy of the GNU Affero General Public License
23# along with this program. If not, see <http://www.gnu.org/licenses/>.
24#
25##############################################################################
26import wizard
027
=== added file 'journal_items_configure_wizard/__openerp__.py'
--- journal_items_configure_wizard/__openerp__.py 1970-01-01 00:00:00 +0000
+++ journal_items_configure_wizard/__openerp__.py 2013-09-03 23:31:15 +0000
@@ -0,0 +1,48 @@
1# -*- encoding: utf-8 -*-
2###########################################################################
3# Module Writen to OpenERP, Open Source Management Solution
4#
5# Copyright (c) 2010 Vauxoo - http://www.vauxoo.com/
6# All Rights Reserved.
7# info Vauxoo (info@vauxoo.com)
8############################################################################
9# Coded by: Luis Ernesto García Medina (ernesto_gm@vauxoo.com)
10############################################################################
11#
12# This program is free software: you can redistribute it and/or modify
13# it under the terms of the GNU Affero General Public License as
14# published by the Free Software Foundation, either version 3 of the
15# License, or (at your option) any later version.
16#
17# This program is distributed in the hope that it will be useful,
18# but WITHOUT ANY WARRANTY; without even the implied warranty of
19# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20# GNU Affero General Public License for more details.
21#
22# You should have received a copy of the GNU Affero General Public License
23# along with this program. If not, see <http://www.gnu.org/licenses/>.
24#
25##############################################################################
26
27{
28 "name" : "Wizard Configure Journal Items",
29 "version" : "1.0",
30 "author" : "Vauxoo",
31 "category" : "Generic Modules",
32 "description" : """
33Configure Journal Items
34=======================
35This module checks if the journal items has the text: "THIS ACCOUNT HAD NEGATIVE VALUES"
36if it is true, inverts the debit amounts of credit for each line, saves the journal entries,
37validates it and changes the text of in the journal item modified to " FIX THIS ACCOUNT"
38 """,
39 "website" : "http://www.vauxoo.com/",
40 "license" : "AGPL-3",
41 "depends" : ["account",
42 ],
43 "data" : [
44 "wizard/move_lines_wiz_view.xml",
45 ],
46 "installable" : True,
47 "active" : False,
48}
049
=== added directory 'journal_items_configure_wizard/i18n'
=== added file 'journal_items_configure_wizard/i18n/es.po'
--- journal_items_configure_wizard/i18n/es.po 1970-01-01 00:00:00 +0000
+++ journal_items_configure_wizard/i18n/es.po 2013-09-03 23:31:15 +0000
@@ -0,0 +1,53 @@
1# Translation of OpenERP Server.
2# This file contains the translation of the following modules:
3# * journal_items_configure_wizard
4#
5msgid ""
6msgstr ""
7"Project-Id-Version: OpenERP Server 7.0\n"
8"Report-Msgid-Bugs-To: \n"
9"POT-Creation-Date: 2013-08-09 18:05+0000\n"
10"PO-Revision-Date: 2013-08-09 13:18-0600\n"
11"Last-Translator: <>\n"
12"Language-Team: \n"
13"MIME-Version: 1.0\n"
14"Content-Type: text/plain; charset=UTF-8\n"
15"Content-Transfer-Encoding: 8bit\n"
16"Plural-Forms: \n"
17"X-Generator: Poedit 1.5.4\n"
18
19#. module: journal_items_configure_wizard
20#: model:ir.model,name:journal_items_configure_wizard.model_wizard_move_line
21msgid "wizard.move.line"
22msgstr "wizard.move.line"
23
24#. module: journal_items_configure_wizard
25#: view:wizard.move.line:0
26msgid "Fix Journal Items With Negative Values"
27msgstr "Reaparar Apuntes Contables con Valores Negativos"
28
29#. module: journal_items_configure_wizard
30#: view:wizard.move.line:0
31msgid "Press button for fix Journal Items with negative values."
32msgstr "Presiona el Botón para Reparar Apuntes Contables con Valores Negativos"
33
34#. module: journal_items_configure_wizard
35#: view:wizard.move.line:0
36msgid "Cancel"
37msgstr "Cancelar"
38
39#. module: journal_items_configure_wizard
40#: view:wizard.move.line:0
41msgid "Apply"
42msgstr "Aplicar"
43
44#. module: journal_items_configure_wizard
45#: view:wizard.move.line:0
46msgid "or"
47msgstr "o"
48
49#. module: journal_items_configure_wizard
50#: model:ir.actions.act_window,name:journal_items_configure_wizard.action_wizard_configure_move_line
51#: model:ir.ui.menu,name:journal_items_configure_wizard.menu_action_configure_move_line_wizard
52msgid "Configure Journal Items"
53msgstr "Configurar Apuntes Contables"
054
=== added file 'journal_items_configure_wizard/i18n/es_MX.po'
=== added directory 'journal_items_configure_wizard/wizard'
=== added file 'journal_items_configure_wizard/wizard/__init__.py'
--- journal_items_configure_wizard/wizard/__init__.py 1970-01-01 00:00:00 +0000
+++ journal_items_configure_wizard/wizard/__init__.py 2013-09-03 23:31:15 +0000
@@ -0,0 +1,26 @@
1# -*- encoding: utf-8 -*-
2###########################################################################
3# Module Writen to OpenERP, Open Source Management Solution
4#
5# Copyright (c) 2010 Vauxoo - http://www.vauxoo.com/
6# All Rights Reserved.
7# info Vauxoo (info@vauxoo.com)
8############################################################################
9# Coded by: Luis Ernesto García Medina (ernesto_gm@vauxoo.com)
10############################################################################
11#
12# This program is free software: you can redistribute it and/or modify
13# it under the terms of the GNU Affero General Public License as
14# published by the Free Software Foundation, either version 3 of the
15# License, or (at your option) any later version.
16#
17# This program is distributed in the hope that it will be useful,
18# but WITHOUT ANY WARRANTY; without even the implied warranty of
19# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20# GNU Affero General Public License for more details.
21#
22# You should have received a copy of the GNU Affero General Public License
23# along with this program. If not, see <http://www.gnu.org/licenses/>.
24#
25##############################################################################
26import move_lines
027
=== added file 'journal_items_configure_wizard/wizard/move_lines.py'
--- journal_items_configure_wizard/wizard/move_lines.py 1970-01-01 00:00:00 +0000
+++ journal_items_configure_wizard/wizard/move_lines.py 2013-09-03 23:31:15 +0000
@@ -0,0 +1,45 @@
1# -*- encoding: utf-8 -*-
2###########################################################################
3# Module Writen to OpenERP, Open Source Management Solution
4#
5# Copyright (c) 2010 Vauxoo - http://www.vauxoo.com/
6# All Rights Reserved.
7# info Vauxoo (info@vauxoo.com)
8############################################################################
9# Coded by: Luis Ernesto García Medina (ernesto_gm@vauxoo.com)
10############################################################################
11#
12# This program is free software: you can redistribute it and/or modify
13# it under the terms of the GNU Affero General Public License as
14# published by the Free Software Foundation, either version 3 of the
15# License, or (at your option) any later version.
16#
17# This program is distributed in the hope that it will be useful,
18# but WITHOUT ANY WARRANTY; without even the implied warranty of
19# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20# GNU Affero General Public License for more details.
21#
22# You should have received a copy of the GNU Affero General Public License
23# along with this program. If not, see <http://www.gnu.org/licenses/>.
24#
25##############################################################################
26from openerp.osv import fields, osv
27from openerp.tools.translate import _
28
29class wizard_move_line(osv.osv_memory):
30 _name = 'wizard.move.line'
31
32 def conf_moves_line(self, cr, uid, ids, context=None):
33 move_line_obj = self.pool.get('account.move.line')
34 move_line_ids = move_line_obj.search(cr, uid, [('name', 'like', 'THIS ACCOUNT HAD NEGATIVE VALUES%')])
35 move_ids = []
36 for line in move_line_obj.browse(cr, uid, move_line_ids):
37 if line.move_id.period_id.state == 'draft':
38 move_line_obj.write(cr, uid, [line.id], {'debit' : line.credit, 'credit' : line.debit})
39 if line.move_id.id not in move_ids:
40 move_ids.append(line.move_id.id)
41 self.pool.get('account.move').validate(cr, uid, move_ids, context=context)
42 for line in move_line_obj.browse(cr, uid, move_line_ids):
43 if line.state == 'valid':
44 move_line_obj.write(cr, uid, [line.id], {'name' : line.name.replace('THIS ACCOUNT HAD NEGATIVE VALUES', 'FIX THIS ACCOUNT')})
45 return True
046
=== added file 'journal_items_configure_wizard/wizard/move_lines_wiz_view.xml'
--- journal_items_configure_wizard/wizard/move_lines_wiz_view.xml 1970-01-01 00:00:00 +0000
+++ journal_items_configure_wizard/wizard/move_lines_wiz_view.xml 2013-09-03 23:31:15 +0000
@@ -0,0 +1,34 @@
1<openerp>
2 <data>
3 <record model="ir.ui.view" id="view_wizard_configure_move_line">
4 <field name="name">view.wizard.configure.move.line</field>
5 <field name="model">wizard.move.line</field>
6 <field name="arch" type="xml">
7 <form string="Fix Journal Items With Negative Values" version="7.0">
8 <footer>
9 <button name="conf_moves_line" type="object" string="Apply" class="oe_highlight"/>
10 or
11 <button type="object" special="cancel" string="Cancel" class="oe_link"/>
12 </footer>
13 <separator colspan="4"/>
14 <p class="oe_grey">
15 Press button for fix Journal Items with negative values.
16 </p>
17 </form>
18 </field>
19 </record>
20
21 <record id="action_wizard_configure_move_line" model="ir.actions.act_window">
22 <field name="name">Configure Journal Items</field>
23 <field name="type">ir.actions.act_window</field>
24 <field name="res_model">wizard.move.line</field>
25 <field name="view_type">form</field>
26 <field name="view_mode">form</field>
27 <field name="view_id" ref="view_wizard_configure_move_line"/>
28 <field name="target">new</field>
29 </record>
30 <menuitem action="action_wizard_configure_move_line" id="menu_action_configure_move_line_wizard" parent="account.menu_finance_configuration" sequence="120"/>
31
32
33 </data>
34</openerp>