avanzosc team mailing list archive
-
avanzosc team
-
Mailing list archive
-
Message #00569
Re: [Merge] lp:~oihanecruce/avanzosc/nayar_impagados into lp:~avanzosc-security-team/avanzosc/72horas
Review: Needs Fixing code review
Algunos comentarios y lo que dices de los wizard.
Un saludo.
Diff comments:
> === modified file 'nayar_impagados/__init__.py'
> --- nayar_impagados/__init__.py 2014-06-11 10:23:47 +0000
> +++ nayar_impagados/__init__.py 2014-07-03 16:00:21 +0000
> @@ -19,8 +19,5 @@
> #
> ##############################################################################
>
> -import account_bank_statement
> -import account_invoice
> -import account_move_line
> -import partner
> -import wizard
> +from . import models
> +from . import wizard
>
> === modified file 'nayar_impagados/__openerp__.py'
> --- nayar_impagados/__openerp__.py 2014-06-11 10:23:47 +0000
> +++ nayar_impagados/__openerp__.py 2014-07-03 16:00:21 +0000
> @@ -19,7 +19,6 @@
> #
> ##############################################################################
>
> -
> {
> "name": "Tratamiento de facturas impagadas",
> "version": "1.0",
> @@ -33,19 +32,15 @@
> "account",
> "dos_partner_additional_info",
> "l10n_es_bank_statement",
> - ],
> - "init_xml": [],
> - "demo_xml": [],
> - "update_xml": [
> + ],
> + "data": [
> "wizard/import_c58_file_view.xml",
> "wizard/make_return_costs_invoices_view.xml",
> "wizard/reconcile_unpaid_account_moves_view.xml",
> "wizard/unpaid_followup_print_view.xml",
> - "reconcile_data.xml",
> - "partner_view.xml",
> - ],
> + "data/reconcile_data.xml",
> + "views/partner_view.xml",
> + ],
> "installable": True,
> "active": False,
> }
> -
> -# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
>
> === added directory 'nayar_impagados/data'
> === renamed file 'nayar_impagados/reconcile_data.xml' => 'nayar_impagados/data/reconcile_data.xml'
> --- nayar_impagados/reconcile_data.xml 2014-06-11 10:23:47 +0000
> +++ nayar_impagados/data/reconcile_data.xml 2014-07-03 16:00:21 +0000
> @@ -1,22 +1,27 @@
> <?xml version="1.0" encoding="utf-8"?>
> <openerp>
> - <data noupdate="1">
> - <record id="unpaid_account_id" model="ir.property">
> - <field name="name">unpaid_account_id</field>
> - <field name="fields_id" search="[('model', '=', 'l10n.es.reconcile.unpaid.account.moves.wizard'), ('name', '=', 'account_id')]"/>
> - <field name="value" model="account.account" search="[('code', '=', '43150000')]"/>
> - </record>
> -
> - <record id="unpaid_journal_id" model="ir.property">
> - <field name="name">unpaid_journal_id</field>
> - <field name="fields_id" search="[('model', '=', 'account.move.line.reconcile.writeoff'), ('name', '=', 'journal_id')]"/>
> - <field name="value" model="account.journal" search="[('code', '=', 'GRAL')]"/>
> - </record>
> -
> - <record id="unpaid_writeoff_account_id" model="ir.property">
> - <field name="name">unpaid_writeoff_account_id</field>
> - <field name="fields_id" search="[('model', '=', 'account.move.line.reconcile.writeoff'), ('name', '=', 'writeoff_acc_id')]"/>
> - <field name="value" model="account.account" search="[('code', '=', '43120000')]"/>
> - </record>
> - </data>
> + <data noupdate="1">
> + <record id="unpaid_account_id" model="ir.property">
> + <field name="name">unpaid_account_id</field>
> + <field name="fields_id"
> + search="[('model', '=', 'l10n.es.reconcile.unpaid.account.moves.wizard'), ('name', '=', 'account_id')]" />
> + <field name="value" model="account.account"
> + search="[('code', '=', '43150000')]" />
Cámbialo mejor por ('code', 'like', '4315%00') y así se puede tener el nº de dígitos que se quiera.
> + </record>
> +
> + <record id="unpaid_journal_id" model="ir.property">
> + <field name="name">unpaid_journal_id</field>
> + <field name="fields_id"
> + search="[('model', '=', 'account.move.line.reconcile.writeoff'), ('name', '=', 'journal_id')]" />
> + <field name="value" model="account.journal" search="[('code', '=', 'GRAL')]" />
> + </record>
> +
> + <record id="unpaid_writeoff_account_id" model="ir.property">
> + <field name="name">unpaid_writeoff_account_id</field>
> + <field name="fields_id"
> + search="[('model', '=', 'account.move.line.reconcile.writeoff'), ('name', '=', 'writeoff_acc_id')]" />
> + <field name="value" model="account.account"
> + search="[('code', '=', '43120000')]" />
('code', 'like', '4312%00')
> + </record>
> + </data>
> </openerp>
>
> === added directory 'nayar_impagados/models'
> === added file 'nayar_impagados/models/__init__.py'
> --- nayar_impagados/models/__init__.py 1970-01-01 00:00:00 +0000
> +++ nayar_impagados/models/__init__.py 2014-07-03 16:00:21 +0000
> @@ -0,0 +1,25 @@
> +# -*- coding: utf-8 -*-
> +##############################################################################
> +#
> +# OpenERP, Open Source Management Solution
> +# Copyright (C) 2013 Javier Sancho (<http://jsancho.org/>)
> +#
> +# 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/>.
> +#
> +##############################################################################
> +
> +from . import account_bank_statement
> +from . import account_invoice
> +from . import account_move_line
> +from . import partner
>
> === renamed file 'nayar_impagados/account_bank_statement.py' => 'nayar_impagados/models/account_bank_statement.py'
> --- nayar_impagados/account_bank_statement.py 2014-06-11 10:23:47 +0000
> +++ nayar_impagados/models/account_bank_statement.py 2014-07-03 16:00:21 +0000
> @@ -24,9 +24,9 @@
> """
>
> import base64
> -from osv import osv, fields
> +from openerp.osv import orm, fields
> import time
> -from tools.translate import _
> +from openerp.tools.translate import _
>
>
> UNPAID_TYPE = (
>
> === renamed file 'nayar_impagados/account_invoice.py' => 'nayar_impagados/models/account_invoice.py'
> --- nayar_impagados/account_invoice.py 2014-06-11 10:23:47 +0000
> +++ nayar_impagados/models/account_invoice.py 2014-07-03 16:00:21 +0000
> @@ -19,13 +19,13 @@
> #
> ##############################################################################
>
> -from osv import osv, fields
> -
> -class account_invoice(osv.osv):
> +from openerp.osv import orm, fields
> +
> +
> +class AccountInvoice(orm.Model):
> _inherit = 'account.invoice'
>
> _columns = {
> - 'bank_statement_line_id': fields.many2one('account.bank.statement.line', 'Bank Statement Line'),
> - }
> -
> -account_invoice()
> + 'bank_statement_line_id': fields.many2one('account.bank.statement.line',
> + 'Bank Statement Line'),
> + }
>
> === renamed file 'nayar_impagados/account_move_line.py' => 'nayar_impagados/models/account_move_line.py'
> --- nayar_impagados/account_move_line.py 2014-06-11 10:23:47 +0000
> +++ nayar_impagados/models/account_move_line.py 2014-07-03 16:00:21 +0000
> @@ -19,16 +19,17 @@
> #
> ##############################################################################
>
> -from osv import osv
> -from tools.translate import _
> -
> -class account_move_line(osv.osv):
> +from openerp.osv import orm
> +from openerp.tools.translate import _
> +
> +
> +class AccountMoveLine(orm.Model):
> _inherit = 'account.move.line'
>
> def get_writeoff(self, cr, uid, ids, context=None):
> - cr.execute("SELECT SUM(debit - credit) " \
> - "FROM account_move_line " \
> - "WHERE id IN %s",
> + cr.execute("SELECT SUM(debit - credit) "
> + " FROM account_move_line "
> + " WHERE id IN %s",
> (tuple(ids),))
> return cr.fetchall()[0][0]
>
> @@ -37,7 +38,9 @@
> context = {}
>
> if not ids:
> - raise osv.except_osv("Error", "There are not unpaid account move lines to reconcile")
> + raise orm.except_orm(
> + _("Error"),
> + _("There are not unpaid account move lines to reconcile"))
>
> c = context.copy()
> c['active_ids'] = list(ids)
> @@ -46,53 +49,71 @@
>
> if self.get_writeoff(cr, uid, ids):
> # Reconcile With Write-Off
> - writeoff_obj = self.pool.get('account.move.line.reconcile.writeoff')
> - property_obj = self.pool.get('ir.property')
> - journal_id = property_obj.get(cr, uid, 'journal_id', writeoff_obj._name)
> - writeoff_acc_id = property_obj.get(cr, uid, 'writeoff_acc_id', writeoff_obj._name)
> - writeoff_id = writeoff_obj.create(cr, uid, {'journal_id': journal_id and journal_id.id or False,
> - 'writeoff_acc_id': writeoff_acc_id and writeoff_acc_id.id or False,
> - 'date_p': self.read(cr, uid, ids[0])['date'],
> - 'comment': _('Unpaid Write-Off')})
> + writeoff_obj = self.pool['account.move.line.reconcile.writeoff']
> + property_obj = self.pool['ir.property']
> +
> + journal_id = property_obj.get(cr, uid, 'journal_id',
> + writeoff_obj._name)
> + writeoff_acc_id = property_obj.get(
> + cr, uid, 'writeoff_acc_id', writeoff_obj._name)
> + writeoff_id = writeoff_obj.create(
> + cr, uid, {'journal_id': journal_id and journal_id.id or False,
> + 'writeoff_acc_id': (writeoff_acc_id and
> + writeoff_acc_id.id or False),
> + 'date_p': self.read(cr, uid, ids[0])['date'],
> + 'comment': _('Unpaid Write-Off')})
> writeoff_obj.trans_rec_reconcile(cr, uid, [writeoff_id], context=c)
> else:
> # Reconcile Full
> - reconcile_obj = self.pool.get('account.move.line.reconcile')
> - reconcile_obj.trans_rec_reconcile_full(cr, uid, list(ids), context=c)
> + reconcile_obj = self.pool['account.move.line.reconcile']
> + reconcile_obj.trans_rec_reconcile_full(cr, uid, list(ids),
> + context=c)
>
> # Reconcile invoice
> - bank_line_obj = self.pool.get('account.bank.statement.line')
> - reconcile_obj = self.pool.get('account.move.line.reconcile')
> - invoice_obj = self.pool.get('account.invoice')
> - for line in self.browse(cr, uid, ids):
> + bank_line_obj = self.pool['account.bank.statement.line']
> + reconcile_obj = self.pool['account.move.line.reconcile']
> + invoice_obj = self.pool['account.invoice']
> + for line in self.browse(cr, uid, ids, context=c):
> if not line.partner_id:
> continue
>
> # Search tween move line at partner account
> - partner_line_id = self.search(cr, uid, [('move_id', '=', line.move_id.id),
> - ('id', '!=', line.id)])[0]
> - partner_line = self.browse(cr, uid, partner_line_id)
> + partner_line_id = self.search(cr, uid,
> + [('move_id', '=', line.move_id.id),
> + ('id', '!=', line.id)],
> + context=c)[0]
> + partner_line = self.browse(cr, uid, partner_line_id, context=c)
>
> # Search bank statement line and obtain invoice and reconcile object
> - bank_line_id = bank_line_obj.search(cr, uid, [('move_ids', '=', partner_line.move_id.id)])[0]
> + bank_line_id = bank_line_obj.search(
> + cr, uid, [('move_ids', '=', partner_line.move_id.id)],
> + context=c)[0]
> bank_line = bank_line_obj.browse(cr, uid, bank_line_id)
> - reconcile_id = self.search(cr, uid, [('move_id', '=', bank_line.invoice_id.move_id.id),
> - '|', ('reconcile_id', '!=', False),
> - ('reconcile_partial_id', '!=', False)])[0]
> - reconcile = self.browse(cr, uid, reconcile_id)
> - reconcile = reconcile.reconcile_id or reconcile.reconcile_partial_id
> - reconcile_line_ids = [l.id for l in reconcile.line_id + reconcile.line_partial_ids]
> + reconcile_id = self.search(
> + cr, uid, [('move_id', '=', bank_line.invoice_id.move_id.id),
> + '|', ('reconcile_id', '!=', False),
> + ('reconcile_partial_id', '!=', False)],
> + context=c)[0]
> + reconcile = self.browse(cr, uid, reconcile_id, context=c)
> + reconcile = (reconcile.reconcile_id or
> + reconcile.reconcile_partial_id)
> + reconcile_line_ids = [l.id for l in (reconcile.line_id +
> + reconcile.line_partial_ids)]
>
> # Unreconcile move lines
> self._remove_move_reconcile(cr, uid, reconcile_line_ids)
>
> # Search return costs invoice
> - return_costs_invoice_id = invoice_obj.search(cr, uid, [('bank_statement_line_id', '=', bank_line_id)])
> + return_costs_invoice_id = invoice_obj.search(
> + cr, uid, [('bank_statement_line_id', '=', bank_line_id)],
> + context=c)
> if return_costs_invoice_id:
> - return_costs_move_line_ids = self.search(cr, uid, [('invoice', '=', return_costs_invoice_id[0]),
> - ('account_id', '=', partner_line.account_id.id),
> - ('reconcile_id', '=', False),
> - ('reconcile_partial_id', '=', False)])
> + return_costs_move_line_ids = self.search(
> + cr, uid, [('invoice', '=', return_costs_invoice_id[0]),
> + ('account_id', '=', partner_line.account_id.id),
> + ('reconcile_id', '=', False),
> + ('reconcile_partial_id', '=', False)],
> + context=c)
> if return_costs_move_line_ids:
> reconcile_line_ids += return_costs_move_line_ids
>
> @@ -103,6 +124,5 @@
> c['active_ids'] = reconcile_line_ids
> c['active_id'] = reconcile_line_ids[0]
> c['active_model'] = 'account.move.line'
> - reconcile_obj.trans_rec_reconcile_partial_reconcile(cr, uid, reconcile_id, context=c)
> -
> -account_move_line()
> + reconcile_obj.trans_rec_reconcile_partial_reconcile(
> + cr, uid, reconcile_id, context=c)
>
> === renamed file 'nayar_impagados/partner.py' => 'nayar_impagados/models/partner.py'
> --- nayar_impagados/partner.py 2014-06-11 10:23:47 +0000
> +++ nayar_impagados/models/partner.py 2014-07-03 16:00:21 +0000
> @@ -19,17 +19,17 @@
> #
> ##############################################################################
>
> -from osv import osv, fields
> -
> -class res_partner(osv.osv):
> +from openerp.osv import orm, fields
> +
> +
> +class ResPartner(osv.osv):
orm.Model
> _inherit = 'res.partner'
>
> _columns = {
> - 'receive_followups_for_customers': fields.boolean('Receive followups for customers'),
> - }
> + 'receive_followups_for_customers':
> + fields.boolean('Receive followups for customers'),
Poner arriba fields.boolean( e indentar consecuentemente
> + }
>
> _default = {
> 'receive_followups_for_customers': False,
> - }
> -
> -res_partner()
> + }
>
> === added directory 'nayar_impagados/views'
> === renamed file 'nayar_impagados/account_bank_statement_view.xml' => 'nayar_impagados/views/account_bank_statement_view.xml'
> --- nayar_impagados/account_bank_statement_view.xml 2014-06-11 10:23:47 +0000
> +++ nayar_impagados/views/account_bank_statement_view.xml 2014-07-03 16:00:21 +0000
> @@ -1,16 +1,18 @@
> <?xml version="1.0" encoding="utf-8"?>
> <openerp>
> - <data>
> - <record id="view_bank_statement_form" model="ir.ui.view">
> - <field name="name">account.bank.statement.form</field>
> - <field name="model">account.bank.statement</field>
> - <field name="inherit_id" ref="account.view_bank_statement_form" />
> - <field name="type">form</field>
> - <field name="arch" type="xml">
> - <button name="button_confirm_bank" position="before">
> - <button name="%(action_make_return_costs_invoices_wizard)d" string="Return Costs Invoices" type="action" icon="gtk-ok"/>
> - </button>
> - </field>
> - </record>
> - </data>
> + <data>
> + <record id="view_bank_statement_form" model="ir.ui.view">
> + <field name="name">account.bank.statement.form</field>
> + <field name="model">account.bank.statement</field>
> + <field name="inherit_id" ref="account.view_bank_statement_form" />
> + <field name="arch" type="xml">
> + <button name="button_confirm_bank" position="before">
> + <button
> + name="%(action_make_return_costs_invoices_wizard)d"
> + string="Return Costs Invoices" type="action"
> + icon="gtk-ok" />
> + </button>
> + </field>
> + </record>
> + </data>
> </openerp>
>
> === renamed file 'nayar_impagados/partner_view.xml' => 'nayar_impagados/views/partner_view.xml'
> --- nayar_impagados/partner_view.xml 2014-06-11 10:23:47 +0000
> +++ nayar_impagados/views/partner_view.xml 2014-07-03 16:00:21 +0000
> @@ -1,15 +1,17 @@
> <?xml version="1.0" encoding="utf-8"?>
> <openerp>
> - <data>
> - <record id="view_partner_additional_info_form" model="ir.ui.view">
> - <field name="name">res.partner.additional.info.form</field>
> - <field name="model">res.partner</field>
> - <field name="inherit_id" ref="dos_partner_additional_info.view_partner_additional_info_form"/>
> - <field name="arch" type="xml">
> - <field name="tipo_cliente" position="after">
> - <field name="receive_followups_for_customers" colspan="4"/>
> - </field>
> - </field>
> - </record>
> - </data>
> + <data>
> + <record id="view_partner_additional_info_form" model="ir.ui.view">
> + <field name="name">res.partner.additional.info.form</field>
> + <field name="model">res.partner</field>
> + <field name="inherit_id"
> + ref="dos_partner_additional_info.view_partner_additional_info_form" />
> + <field name="arch" type="xml">
> + <field name="tipo_cliente" position="after">
> + <field name="receive_followups_for_customers"
> + colspan="4" />
> + </field>
> + </field>
> + </record>
> + </data>
> </openerp>
>
> === modified file 'nayar_impagados/wizard/import_c58_file.py'
> --- nayar_impagados/wizard/import_c58_file.py 2014-06-11 10:23:47 +0000
> +++ nayar_impagados/wizard/import_c58_file.py 2014-07-03 16:00:21 +0000
> @@ -19,19 +19,15 @@
> #
> ##############################################################################
>
> -from osv import osv
> +from openerp.osv import orm
>
> -class import_c58_wizard(osv.osv_memory):
> +class ImportC58Wizard(orm.TransientModel):
> _name = "l10n.es.bank.statement.unpaid.import.c58.wizard"
> _inherit = "l10n.es.bank.statement.import.c43.wizard"
>
> def import_action(self, cr, uid, ids, context=None):
> - st_obj = self.pool.get('account.bank.statement')
> + st_obj = self.pool['account.bank.statement']
> file_contents = self.browse(cr, uid, ids)[0].file
> - st_obj.import_c58_file(cr, uid, context['active_id'], file_contents, context=context)
> + st_obj.import_c58_file(cr, uid, context['active_id'], file_contents,
> + context=context)
> return {'type': 'ir.actions.act_window_close'}
> -
> -
> -import_c58_wizard()
> -
> -# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
>
> === modified file 'nayar_impagados/wizard/import_c58_file_view.xml'
> --- nayar_impagados/wizard/import_c58_file_view.xml 2014-06-11 10:23:47 +0000
> +++ nayar_impagados/wizard/import_c58_file_view.xml 2014-07-03 16:00:21 +0000
> @@ -1,47 +1,52 @@
> <?xml version="1.0" encoding="utf-8"?>
> <openerp>
> - <data>
> -
> - <!-- Import C58 file wizard -->
> - <record model="ir.ui.view" id="c58_file_import_wizard">
> - <field name="name">l10n.es.bank.statement.unpaid.c58.import.form</field>
> - <field name="model">l10n.es.bank.statement.unpaid.import.c58.wizard</field>
> - <field name="type">form</field>
> - <field name="arch" type="xml">
> - <form string="Bank statements import according to norm C58">
> - <group colspan="4">
> - <label string="Bank Statements File:"/>
> - <newline/>
> - <field name="file_name" nolabel="1"/>
> - <field name="file" filename="file_name" nolabel="1"/>
> - </group>
> - <group colspan="4" col="1">
> - <separator string="Automatic reconciliation options"/>
> - <field name="reco_reference_and_amount"/>
> - <field name="reco_vat_and_amount"/>
> - <field name="reco_amount"/>
> - <field name="reco_payment_order"/>
> - <field name="reco_rules"/>
> - <field name="reco_max_days"/>
> - </group>
> - <button icon="gtk-cancel" special="cancel" string="Cancel" type="object"/>
> - <button icon="gtk-ok" name="import_action" string="Import" type="object"/>
> - </form>
> - </field>
> - </record>
> -
> - <record id="action_c58_file_import_wizard" model="ir.actions.act_window">
> - <field name="name">Import C58 Files Wizard</field>
> - <field name="type">ir.actions.act_window</field>
> - <field name="res_model">l10n.es.bank.statement.unpaid.import.c58.wizard</field>
> - <field name="view_type">form</field>
> - <field name="view_mode">form</field>
> - <field name="target">new</field>
> - </record>
> -
> - <act_window id="action_c58_file_import_wizard"
> - key2="client_action_multi" name="Import Unpaid Bank Statement"
> - res_model="l10n.es.bank.statement.unpaid.import.c58.wizard" src_model="account.bank.statement"
> - view_mode="form" target="new" view_type="form" groups="account.group_account_manager"/>
> - </data>
> + <data>
> +
> + <!-- Import C58 file wizard -->
> + <record model="ir.ui.view" id="c58_file_import_wizard">
> + <field name="name">l10n.es.bank.statement.unpaid.c58.import.form
> + </field>
> + <field name="model">l10n.es.bank.statement.unpaid.import.c58.wizard
> + </field>
> + <field name="arch" type="xml">
> + <form string="Bank statements import according to norm C58">
> + <group colspan="4">
> + <label string="Bank Statements File:" />
> + <newline />
> + <field name="file_name" nolabel="1" />
> + <field name="file" filename="file_name"
> + nolabel="1" />
> + </group>
> + <group colspan="4" col="1">
> + <separator string="Automatic reconciliation options" />
> + <field name="reco_reference_and_amount" />
> + <field name="reco_vat_and_amount" />
> + <field name="reco_amount" />
> + <field name="reco_payment_order" />
> + <field name="reco_rules" />
> + <field name="reco_max_days" />
> + </group>
> + <button icon="gtk-cancel" special="cancel"
Poner estilo v7 con footer y demás.
> + string="Cancel" type="object" />
> + <button icon="gtk-ok" name="import_action"
> + string="Import" type="object" />
> + </form>
> + </field>
> + </record>
> +
> + <record id="action_c58_file_import_wizard" model="ir.actions.act_window">
> + <field name="name">Import C58 Files Wizard</field>
> + <field name="type">ir.actions.act_window</field>
> + <field name="res_model">l10n.es.bank.statement.unpaid.import.c58.wizard
> + </field>
> + <field name="view_type">form</field>
> + <field name="view_mode">form</field>
> + <field name="target">new</field>
> + </record>
> +
> + <act_window id="action_c58_file_import_wizard" key2="client_action_multi"
> + name="Import Unpaid Bank Statement" res_model="l10n.es.bank.statement.unpaid.import.c58.wizard"
> + src_model="account.bank.statement" view_mode="form" target="new"
> + view_type="form" groups="account.group_account_manager" />
> + </data>
> </openerp>
>
> === modified file 'nayar_impagados/wizard/make_return_costs_invoices_view.xml'
> --- nayar_impagados/wizard/make_return_costs_invoices_view.xml 2014-06-11 10:23:47 +0000
> +++ nayar_impagados/wizard/make_return_costs_invoices_view.xml 2014-07-03 16:00:21 +0000
> @@ -1,47 +1,51 @@
> <?xml version="1.0" encoding="utf-8"?>
> <openerp>
> - <data>
> - <record model="ir.ui.view" id="bank_statement_return_costs_invoices_wizard">
> - <field name="name">l10n.es.bank.statement.return.costs.invoices.form</field>
> - <field name="model">l10n.es.bank.statement.return.costs.invoices.wizard</field>
> - <field name="type">form</field>
> - <field name="arch" type="xml">
> - <form string="Return Costs Invoices">
> - <field name="unpaid_lines" nolabel="1" colspan="4">
> - <tree string="Statement Lines">
> - <field name="name"/>
> - <field name="ref"/>
> - <field name="partner_id"/>
> - <field name="amount"/>
> - </tree>
> - </field>
> - <group colspan="4" col="4">
> - <separator string="Bank Conditions" colspan="4" col="4"/>
> - <field name="return_costs"/>
> - <separator colspan="4" col="4"/>
> - </group>
> - <button icon="gtk-cancel" special="cancel" string="Cancel"/>
> - <button icon="gtk-ok" name="make_invoices" string="Make invoices" type="object"/>
> - </form>
> - </field>
> - </record>
> -
> - <record id="action_make_return_costs_invoices_wizard" model="ir.actions.act_window">
> - <field name="name">Return Costs Invoices</field>
> - <field name="type">ir.actions.act_window</field>
> - <field name="res_model">l10n.es.bank.statement.return.costs.invoices.wizard</field>
> - <field name="view_type">form</field>
> - <field name="view_mode">form</field>
> - <field name="target">new</field>
> - </record>
> -
> - <act_window id="action_make_return_costs_invoices_wizard"
> - name="Return Costs Invoices"
> - res_model="l10n.es.bank.statement.return.costs.invoices.wizard"
> - src_model="account.bank.statement"
> - view_mode="form"
> - target="new"
> - view_type="form"
> - groups="account.group_account_manager" />
> - </data>
> + <data>
> + <record model="ir.ui.view"
> + id="bank_statement_return_costs_invoices_wizard">
> + <field name="name">l10n.es.bank.statement.return.costs.invoices.form
> + </field>
> + <field name="model">l10n.es.bank.statement.return.costs.invoices.wizard
> + </field>
> + <field name="arch" type="xml">
> + <form string="Return Costs Invoices">
> + <field name="unpaid_lines" nolabel="1"
> + colspan="4">
> + <tree string="Statement Lines">
> + <field name="name" />
> + <field name="ref" />
> + <field name="partner_id" />
> + <field name="amount" />
> + </tree>
> + </field>
> + <group colspan="4" col="4">
> + <separator string="Bank Conditions"
> + colspan="4" col="4" />
> + <field name="return_costs" />
> + <separator colspan="4" col="4" />
> + </group>
> + <button icon="gtk-cancel" special="cancel"
Poner estilo v7
> + string="Cancel" />
> + <button icon="gtk-ok" name="make_invoices"
> + string="Make invoices" type="object" />
> + </form>
> + </field>
> + </record>
> +
> + <record id="action_make_return_costs_invoices_wizard"
> + model="ir.actions.act_window">
> + <field name="name">Return Costs Invoices</field>
> + <field name="type">ir.actions.act_window</field>
> + <field name="res_model">l10n.es.bank.statement.return.costs.invoices.wizard
> + </field>
> + <field name="view_type">form</field>
> + <field name="view_mode">form</field>
> + <field name="target">new</field>
> + </record>
> +
> + <act_window id="action_make_return_costs_invoices_wizard"
> + name="Return Costs Invoices" res_model="l10n.es.bank.statement.return.costs.invoices.wizard"
> + src_model="account.bank.statement" view_mode="form" target="new"
> + view_type="form" groups="account.group_account_manager" />
> + </data>
> </openerp>
>
> === modified file 'nayar_impagados/wizard/reconcile_unpaid_account_moves_view.xml'
> --- nayar_impagados/wizard/reconcile_unpaid_account_moves_view.xml 2014-06-11 10:23:47 +0000
> +++ nayar_impagados/wizard/reconcile_unpaid_account_moves_view.xml 2014-07-03 16:00:21 +0000
> @@ -1,40 +1,48 @@
> <?xml version="1.0" encoding="utf-8"?>
> <openerp>
> - <data>
> - <record model="ir.ui.view" id="reconcile_unpaid_account_moves_wizard">
> - <field name="name">l10n.es.reconcile.unpaid.account.moves.form</field>
> - <field name="model">l10n.es.reconcile.unpaid.account.moves.wizard</field>
> - <field name="type">form</field>
> - <field name="arch" type="xml">
> - <form string="Reconcile Unpaid Account Moves">
> - <field name="unpaid_account_lines" nolabel="1" colspan="4">
> - <tree string="Unpaid Lines">
> - <field name="date" />
> - <field name="period_id" />
> - <field name="move_id" />
> - <field name="name" />
> - <field name="partner_id" />
> - <field name="debit" sum="Debit" />
> - <field name="credit" sum="Credit" />
> - <field name="ref" />
> - </tree>
> - </field>
> - <button icon="gtk-cancel" special="cancel" string="Cancel" />
> - <button icon="gtk-ok" name="reconcile_unpaid_moves" string="Reconcile" type="object" />
> - </form>
> - </field>
> - </record>
> -
> - <record id="action_reconcile_unpaid_account_moves_wizard" model="ir.actions.act_window">
> - <field name="name">Reconcile Unpaid Account Moves</field>
> - <field name="type">ir.actions.act_window</field>
> - <field name="res_model">l10n.es.reconcile.unpaid.account.moves.wizard</field>
> - <field name="view_type">form</field>
> - <field name="view_mode">form</field>
> - <field name="target">new</field>
> - </record>
> -
> - <menuitem name="Reconcile Unpaid Account Moves" id="menu_reconcile_unpaid_account_moves" parent="account.menu_finance_bank_and_cash" action="action_reconcile_unpaid_account_moves_wizard" sequence="20"/>
> -
> - </data>
> + <data>
> + <record model="ir.ui.view" id="reconcile_unpaid_account_moves_wizard">
> + <field name="name">l10n.es.reconcile.unpaid.account.moves.form
> + </field>
> + <field name="model">l10n.es.reconcile.unpaid.account.moves.wizard
> + </field>
> + <field name="arch" type="xml">
> + <form string="Reconcile Unpaid Account Moves">
> + <field name="unpaid_account_lines" nolabel="1"
> + colspan="4">
> + <tree string="Unpaid Lines">
> + <field name="date" />
> + <field name="period_id" />
> + <field name="move_id" />
> + <field name="name" />
> + <field name="partner_id" />
> + <field name="debit" sum="Debit" />
> + <field name="credit" sum="Credit" />
> + <field name="ref" />
> + </tree>
> + </field>
> + <button icon="gtk-cancel" special="cancel"
Poner estilo v7
> + string="Cancel" />
> + <button icon="gtk-ok" name="reconcile_unpaid_moves"
> + string="Reconcile" type="object" />
> + </form>
> + </field>
> + </record>
> +
> + <record id="action_reconcile_unpaid_account_moves_wizard"
> + model="ir.actions.act_window">
> + <field name="name">Reconcile Unpaid Account Moves</field>
> + <field name="type">ir.actions.act_window</field>
> + <field name="res_model">l10n.es.reconcile.unpaid.account.moves.wizard
> + </field>
> + <field name="view_type">form</field>
> + <field name="view_mode">form</field>
> + <field name="target">new</field>
> + </record>
> +
> + <menuitem name="Reconcile Unpaid Account Moves" id="menu_reconcile_unpaid_account_moves"
> + parent="account.menu_finance_bank_and_cash" action="action_reconcile_unpaid_account_moves_wizard"
> + sequence="20" />
> +
> + </data>
> </openerp>
>
> === modified file 'nayar_impagados/wizard/unpaid_followup_print_view.xml'
> --- nayar_impagados/wizard/unpaid_followup_print_view.xml 2014-06-11 10:23:47 +0000
> +++ nayar_impagados/wizard/unpaid_followup_print_view.xml 2014-07-03 16:00:21 +0000
> @@ -1,20 +1,22 @@
> <?xml version="1.0" encoding="utf-8"?>
> <openerp>
> - <data>
> - <record id="action_unpaid_followup_print" model="ir.actions.server">
> - <field name="name">Send followups</field>
> - <field name="type">ir.actions.server</field>
> - <field name="model_id" ref="model_account_bank_statement"/>
> - <field name="state">code</field>
> - <field name="code">action = obj.unpaid_followup_print(context=context)</field>
> - </record>
> + <data>
> + <record id="action_unpaid_followup_print" model="ir.actions.server">
> + <field name="name">Send followups</field>
> + <field name="type">ir.actions.server</field>
> + <field name="model_id" ref="model_account_bank_statement" />
> + <field name="state">code</field>
> + <field name="code">action =
> + obj.unpaid_followup_print(context=context)</field>
> + </record>
>
> - <record id="ir_unpaid_followup_print" model="ir.values">
> - <field name="name">Send followups</field>
> - <field name="model">account.bank.statement</field>
> - <field name="key2">client_action_multi</field>
> - <field name="value" eval="'ir.actions.server,%d'%action_unpaid_followup_print"/>
> - <field name="object">True</field>
> - </record>
> - </data>
> + <record id="ir_unpaid_followup_print" model="ir.values">
> + <field name="name">Send followups</field>
> + <field name="model">account.bank.statement</field>
> + <field name="key2">client_action_multi</field>
> + <field name="value"
> + eval="'ir.actions.server,%d'%action_unpaid_followup_print" />
> + <field name="object">True</field>
> + </record>
> + </data>
> </openerp>
>
--
https://code.launchpad.net/~oihanecruce/avanzosc/nayar_impagados/+merge/225513
Your team Avanzosc_security is subscribed to branch lp:~avanzosc-security-team/avanzosc/72horas.
References