Merge lp:~vauxoo/openerp-venezuela-localization/ovl70-wh-rev-kty into lp:~vauxoo/openerp-venezuela-localization/ovl70-wh-rev-hbto

Proposed by Katherine Zaoral (Vauxoo)
Status: Merged
Merged at revision: 771
Proposed branch: lp:~vauxoo/openerp-venezuela-localization/ovl70-wh-rev-kty
Merge into: lp:~vauxoo/openerp-venezuela-localization/ovl70-wh-rev-hbto
Diff against target: 4482 lines (+1051/-1223)
65 files modified
l10n_ve_fiscal_requirements/model/__init__.py (+1/-0)
l10n_ve_fiscal_requirements/model/invoice.py (+9/-16)
l10n_ve_fiscal_requirements/model/res_users.py (+47/-0)
l10n_ve_fiscal_requirements/test/fr_damaged.yml (+1/-3)
l10n_ve_fiscal_requirements/test/fr_purchase_test.yml (+2/-2)
l10n_ve_fiscal_requirements/test/fr_refund_note.yml (+5/-11)
l10n_ve_fiscal_requirements/test/fr_sale_test.yml (+1/-3)
l10n_ve_fiscal_requirements/test/fr_vat_test.yml (+20/-13)
l10n_ve_fiscal_requirements/view/account_inv_refund_nctrl_view.xml (+0/-1)
l10n_ve_fiscal_requirements/view/account_invoice_view.xml (+0/-3)
l10n_ve_fiscal_requirements/view/account_tax_view.xml (+0/-1)
l10n_ve_fiscal_requirements/view/l10n_ut_view.xml (+0/-3)
l10n_ve_fiscal_requirements/view/partner_view.xml (+0/-1)
l10n_ve_fiscal_requirements/wizard/account_invoice_debit.py (+15/-38)
l10n_ve_fiscal_requirements/wizard/account_invoice_debit_view.xml (+0/-1)
l10n_ve_fiscal_requirements/wizard/account_invoice_parent_view.xml (+0/-1)
l10n_ve_fiscal_requirements/wizard/account_invoice_refund.py (+19/-26)
l10n_ve_fiscal_requirements/wizard/search_info_partner_seniat.py (+0/-1)
l10n_ve_fiscal_requirements/wizard/search_info_partner_seniat.xml (+0/-1)
l10n_ve_fiscal_requirements/wizard/update_info_partner.py (+0/-1)
l10n_ve_fiscal_requirements/wizard/update_info_partner.xml (+0/-1)
l10n_ve_fiscal_requirements/wizard/wizard_invoice_nro_ctrl_view.xml (+0/-1)
l10n_ve_fiscal_requirements/wizard/wizard_nro_ctrl_view.xml (+0/-1)
l10n_ve_fiscal_requirements/wizard/wizard_url_seniat_view.xml (+0/-1)
l10n_ve_withholding/test/wh_pay_invoice.yml (+6/-5)
l10n_ve_withholding/view/account_view.xml (+2/-0)
l10n_ve_withholding_islr/__init__.py (+1/-1)
l10n_ve_withholding_islr/__openerp__.py (+6/-6)
l10n_ve_withholding_islr/demo/retencion_islr_sequence.xml (+6/-6)
l10n_ve_withholding_islr/i18n/es.po (+54/-54)
l10n_ve_withholding_islr/i18n/es_VE.po (+54/-54)
l10n_ve_withholding_islr/model/installer.py (+9/-9)
l10n_ve_withholding_islr/model/invoice.py (+71/-576)
l10n_ve_withholding_islr/model/islr_wh_concept.py (+1/-1)
l10n_ve_withholding_islr/model/islr_wh_doc.py (+320/-147)
l10n_ve_withholding_islr/model/islr_xml_wh.py (+8/-8)
l10n_ve_withholding_islr/model/partner.py (+3/-0)
l10n_ve_withholding_islr/model/product.py (+2/-2)
l10n_ve_withholding_islr/report/islr_wh_report.xml (+2/-2)
l10n_ve_withholding_islr/view/installer.xml (+2/-3)
l10n_ve_withholding_islr/view/invoice_view.xml (+11/-11)
l10n_ve_withholding_islr/view/islr_wh_concept_view.xml (+7/-12)
l10n_ve_withholding_islr/view/islr_wh_doc_view.xml (+85/-91)
l10n_ve_withholding_islr/view/islr_xml_wh.xml (+2/-6)
l10n_ve_withholding_islr/view/partner_view.xml (+0/-1)
l10n_ve_withholding_islr/view/product_view.xml (+1/-3)
l10n_ve_withholding_islr/view/wh_islr_view.xml (+1/-1)
l10n_ve_withholding_islr/workflow/account_workflow.xml (+3/-3)
l10n_ve_withholding_islr/workflow/islr_wh_workflow.xml (+7/-5)
l10n_ve_withholding_iva/model/__init__.py (+0/-1)
l10n_ve_withholding_src/__init__.py (+2/-0)
l10n_ve_withholding_src/__openerp__.py (+4/-1)
l10n_ve_withholding_src/data/data.xml (+22/-27)
l10n_ve_withholding_src/model/__init__.py (+1/-0)
l10n_ve_withholding_src/model/invoice.py (+36/-1)
l10n_ve_withholding_src/model/partner.py (+8/-10)
l10n_ve_withholding_src/model/wh_src.py (+43/-2)
l10n_ve_withholding_src/security/ir.model.access.csv (+1/-0)
l10n_ve_withholding_src/view/account_invoice_view.xml (+15/-2)
l10n_ve_withholding_src/view/company_view.xml (+3/-3)
l10n_ve_withholding_src/view/partner_view.xml (+12/-20)
l10n_ve_withholding_src/view/wh_src_view.xml (+23/-18)
l10n_ve_withholding_src/wizard/__init__.py (+2/-1)
l10n_ve_withholding_src/wizard/wizard_retention.py (+59/-0)
l10n_ve_withholding_src/wizard/wizard_retention_view.xml (+36/-0)
To merge this branch: bzr merge lp:~vauxoo/openerp-venezuela-localization/ovl70-wh-rev-kty
Reviewer Review Type Date Requested Status
hbto [Vauxoo] http://www.vauxoo.com Pending
Review via email: mp+143170@code.launchpad.net

Description of the change

[FIX] First revision of wh module

To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'l10n_ve_fiscal_requirements/model/__init__.py'
--- l10n_ve_fiscal_requirements/model/__init__.py 2012-12-04 10:35:10 +0000
+++ l10n_ve_fiscal_requirements/model/__init__.py 2013-01-14 19:15:27 +0000
@@ -25,6 +25,7 @@
25import account 25import account
26import invoice26import invoice
27import partner27import partner
28import res_users
28import res_company29import res_company
29import seniat_url30import seniat_url
30import l10n_ut31import l10n_ut
3132
=== modified file 'l10n_ve_fiscal_requirements/model/invoice.py'
--- l10n_ve_fiscal_requirements/model/invoice.py 2012-12-04 21:56:01 +0000
+++ l10n_ve_fiscal_requirements/model/invoice.py 2013-01-14 19:15:27 +0000
@@ -79,22 +79,6 @@
79 _constraints = [79 _constraints = [
80 (_unique_invoice_per_partner, _('The Document you have been entering for this Partner has already been recorded'),['Control Number (nro_ctrl)','Reference (reference)']),80 (_unique_invoice_per_partner, _('The Document you have been entering for this Partner has already been recorded'),['Control Number (nro_ctrl)','Reference (reference)']),
81 ]81 ]
82
83 def _refund_cleanup_lines(self, cr, uid, lines):
84 """
85 Method created to clean invoice lines
86 """
87 for line in lines:
88 del line['id']
89 del line['invoice_id']
90 #TODO Verify one more elegant way to do this
91 for field in ('company_id', 'partner_id', 'account_id', 'product_id',
92 'uos_id', 'account_analytic_id', 'tax_code_id', 'base_code_id',
93 "concept_id","tax_id"):
94 line[field] = line.get(field, False) and line[field][0]
95 if 'invoice_line_tax_id' in line:
96 line['invoice_line_tax_id'] = [(6,0, line.get('invoice_line_tax_id', [])) ]
97 return map(lambda x: (0,0,x), lines)
9882
99 def copy(self, cr, uid, id, default={}, context=None):83 def copy(self, cr, uid, id, default={}, context=None):
100 if context is None:84 if context is None:
@@ -108,4 +92,13 @@
108account_invoice()92account_invoice()
10993
11094
95class account_invoice_tax(osv.osv):
96 _inherit = 'account.invoice.tax'
97 _columns = {
98 'tax_id': fields.many2one('account.tax', 'Tax', required=False, ondelete='set null',
99 help="Tax relation to original tax, to be able to take off all data from invoices."),
100 }
101
102account_invoice_tax()
103
111# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:104# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
112105
=== added file 'l10n_ve_fiscal_requirements/model/res_users.py'
--- l10n_ve_fiscal_requirements/model/res_users.py 1970-01-01 00:00:00 +0000
+++ l10n_ve_fiscal_requirements/model/res_users.py 2013-01-14 19:15:27 +0000
@@ -0,0 +1,47 @@
1#!/usr/bin/python
2# -*- encoding: utf-8 -*-
3###########################################################################
4# Module Writen to OpenERP, Open Source Management Solution
5# Copyright (C) OpenERP Venezuela (<http://openerp.com.ve>).
6# All Rights Reserved
7###############Credits######################################################
8# Coded by: Humberto Arocha <humberto@vauxoo.com>
9# MarĂ­a Gabriela Quilarque <gabriela@vauxoo.com>
10# Nhomar Hernandez <nhomar@vauxoo.com>
11# Planified by: Humberto Arocha
12# Finance by: Helados Gilda, C.A. http://heladosgilda.com.ve
13# Audited by: Humberto Arocha humberto@openerp.com.ve
14#############################################################################
15# This program is free software: you can redistribute it and/or modify
16# it under the terms of the GNU Affero General Public License as published by
17# the Free Software Foundation, either version 3 of the License, or
18# (at your option) any later version.
19#
20# This program is distributed in the hope that it will be useful,
21# but WITHOUT ANY WARRANTY; without even the implied warranty of
22# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
23# GNU Affero General Public License for more details.
24#
25# You should have received a copy of the GNU Affero General Public License
26# along with this program. If not, see <http://www.gnu.org/licenses/>.
27##############################################################################
28
29from osv import fields, osv
30import tools
31from tools.translate import _
32from tools import config
33
34class res_users(osv.osv):
35 _inherit = 'res.users'
36
37 def create(self, cr, uid, vals, context=None):
38 if context is None: context = {}
39 context.update({'create_company':True})
40 return super(res_users, self).create(cr, uid, vals, context=context)
41
42 def write(self, cr, uid, ids, values, context=None):
43 context = context or {}
44 context.update({'create_company':True})
45 return super(res_users, self).write(cr, uid, ids, values, context=context)
46
47res_users()
048
=== modified file 'l10n_ve_fiscal_requirements/test/fr_damaged.yml'
--- l10n_ve_fiscal_requirements/test/fr_damaged.yml 2012-09-26 16:20:44 +0000
+++ l10n_ve_fiscal_requirements/test/fr_damaged.yml 2013-01-14 19:15:27 +0000
@@ -19,11 +19,9 @@
19 company_id: base.main_company19 company_id: base.main_company
20 currency_id: base.EUR20 currency_id: base.EUR
21 date_invoice: !eval time.strftime('%Y-%m-%d')21 date_invoice: !eval time.strftime('%Y-%m-%d')
22 address_contact_id: base.res_partner_address_3
23 address_invoice_id: base.res_partner_address_3
24 account_id: account.a_recv22 account_id: account.a_recv
25 invoice_line:23 invoice_line:
26 - product_id: product.product_product_pc224 - product_id: product.product_product_3
27 quantity: 525 quantity: 5
28 uos_id: product.product_uom_unit26 uos_id: product.product_uom_unit
29 price_unit: 2027 price_unit: 20
3028
=== modified file 'l10n_ve_fiscal_requirements/test/fr_purchase_test.yml'
--- l10n_ve_fiscal_requirements/test/fr_purchase_test.yml 2012-09-26 16:20:44 +0000
+++ l10n_ve_fiscal_requirements/test/fr_purchase_test.yml 2013-01-14 19:15:27 +0000
@@ -10,7 +10,7 @@
10 date_invoice: !eval time.strftime('%Y-%m-%d')10 date_invoice: !eval time.strftime('%Y-%m-%d')
11 account_id: account.a_recv11 account_id: account.a_recv
12 invoice_line:12 invoice_line:
13 - product_id: product.product_product_pc113 - product_id: product.product_product_4
14 quantity: 314 quantity: 3
15 uos_id: product.product_uom_unit15 uos_id: product.product_uom_unit
16 price_unit: 316 price_unit: 3
@@ -18,7 +18,7 @@
18 account_id: account.a_sale18 account_id: account.a_sale
19 invoice_line_tax_id:19 invoice_line_tax_id:
20 - iva_purchase120 - iva_purchase1
21 - product_id: product.product_product_pc221 - product_id: product.product_product_3
22 quantity: 522 quantity: 5
23 uos_id: product.product_uom_unit23 uos_id: product.product_uom_unit
24 price_unit: 224 price_unit: 2
2525
=== modified file 'l10n_ve_fiscal_requirements/test/fr_refund_note.yml'
--- l10n_ve_fiscal_requirements/test/fr_refund_note.yml 2012-09-26 16:20:44 +0000
+++ l10n_ve_fiscal_requirements/test/fr_refund_note.yml 2013-01-14 19:15:27 +0000
@@ -8,11 +8,9 @@
8 company_id: base.main_company8 company_id: base.main_company
9 currency_id: base.EUR9 currency_id: base.EUR
10 date_invoice: !eval time.strftime('%Y-%m-%d')10 date_invoice: !eval time.strftime('%Y-%m-%d')
11 address_contact_id: base.res_partner_address_3
12 address_invoice_id: base.res_partner_address_3
13 account_id: account.a_recv11 account_id: account.a_recv
14 invoice_line:12 invoice_line:
15 - product_id: product.product_product_pc213 - product_id: product.product_product_3
16 quantity: 514 quantity: 5
17 uos_id: product.product_uom_unit15 uos_id: product.product_uom_unit
18 price_unit: 2016 price_unit: 20
@@ -105,10 +103,10 @@
105 for line in rf_brw.invoice_line:103 for line in rf_brw.invoice_line:
106 for tax in line.invoice_line_tax_id:104 for tax in line.invoice_line_tax_id:
107 tax1.append(tax.id)105 tax1.append(tax.id)
108 rf_brw = self.browse(cr, uid, ai_id[0])106 rf_brw = ai_id and self.browse(cr, uid, ai_id[0])
109 tax2 = []107 tax2 = []
110 whc2 = []108 whc2 = []
111 for line in rf_brw.invoice_line:109 for line in rf_brw and rf_brw.invoice_line:
112 for tax in line.invoice_line_tax_id:110 for tax in line.invoice_line_tax_id:
113 tax2.append(tax.id)111 tax2.append(tax.id)
114 tax1 = set(tax1)112 tax1 = set(tax1)
@@ -126,11 +124,9 @@
126 company_id: base.main_company124 company_id: base.main_company
127 currency_id: base.EUR125 currency_id: base.EUR
128 date_invoice: !eval time.strftime('%Y-%m-%d')126 date_invoice: !eval time.strftime('%Y-%m-%d')
129 address_contact_id: base.res_partner_address_3
130 address_invoice_id: base.res_partner_address_3
131 account_id: account.a_recv127 account_id: account.a_recv
132 invoice_line:128 invoice_line:
133 - product_id: product.product_product_pc2129 - product_id: product.product_product_3
134 quantity: 5130 quantity: 5
135 uos_id: product.product_uom_unit131 uos_id: product.product_uom_unit
136 price_unit: 20132 price_unit: 20
@@ -232,11 +228,9 @@
232 company_id: base.main_company228 company_id: base.main_company
233 currency_id: base.EUR229 currency_id: base.EUR
234 date_invoice: !eval time.strftime('%Y-%m-%d')230 date_invoice: !eval time.strftime('%Y-%m-%d')
235 address_contact_id: base.res_partner_address_3
236 address_invoice_id: base.res_partner_address_3
237 account_id: account.a_recv231 account_id: account.a_recv
238 invoice_line:232 invoice_line:
239 - product_id: product.product_product_pc2233 - product_id: product.product_product_4
240 quantity: 5234 quantity: 5
241 uos_id: product.product_uom_unit235 uos_id: product.product_uom_unit
242 price_unit: 20236 price_unit: 20
243237
=== modified file 'l10n_ve_fiscal_requirements/test/fr_sale_test.yml'
--- l10n_ve_fiscal_requirements/test/fr_sale_test.yml 2012-09-26 16:20:44 +0000
+++ l10n_ve_fiscal_requirements/test/fr_sale_test.yml 2013-01-14 19:15:27 +0000
@@ -8,11 +8,9 @@
8 company_id: base.main_company8 company_id: base.main_company
9 currency_id: base.EUR9 currency_id: base.EUR
10 date_invoice: !eval time.strftime('%Y-%m-%d')10 date_invoice: !eval time.strftime('%Y-%m-%d')
11 address_contact_id: base.res_partner_address_3
12 address_invoice_id: base.res_partner_address_3
13 account_id: account.a_recv11 account_id: account.a_recv
14 invoice_line:12 invoice_line:
15 - product_id: product.product_product_pc213 - product_id: product.product_product_3
16 quantity: 514 quantity: 5
17 uos_id: product.product_uom_unit15 uos_id: product.product_uom_unit
18 price_unit: 2016 price_unit: 20
1917
=== modified file 'l10n_ve_fiscal_requirements/test/fr_vat_test.yml'
--- l10n_ve_fiscal_requirements/test/fr_vat_test.yml 2012-09-26 21:08:18 +0000
+++ l10n_ve_fiscal_requirements/test/fr_vat_test.yml 2013-01-14 19:15:27 +0000
@@ -1,15 +1,6 @@
1-1-
2 5. Fiscal requirements Vat tests2 5. Fiscal requirements Vat tests
3-3-
4 5.1 Add address
5-
6 !record {model: res.partner.address, id: test_fr_add01}:
7 type: invoice
8 street: Av Siempre Viva
9 phone: "(555) 5555555"
10 fax: "(555) 1111111"
11 email: fakemail@example.com
12-
13 5.2 I try to create a partner with wrong vat4 5.2 I try to create a partner with wrong vat
14-5-
15 !python {model: res.partner}: |6 !python {model: res.partner}: |
@@ -19,7 +10,11 @@
19 'supplier': True,10 'supplier': True,
20 'customer': True,11 'customer': True,
21 'vat': 'VEV333',12 'vat': 'VEV333',
22 'address':[(6, 0, [ref("test_fr_add01")])]13 'type': 'invoice',
14 'street': 'Av Siempre Viva',
15 'phone': "(555) 5555555",
16 'fax': "(555) 1111111",
17 'email': 'fakemail@example.com',
23 }18 }
24 part_id = False19 part_id = False
25 try:20 try:
@@ -46,7 +41,11 @@
46 'supplier': True,41 'supplier': True,
47 'customer': True,42 'customer': True,
48 'vat': 'VEJ112223330',43 'vat': 'VEJ112223330',
49 'address': [(6, 0, [ref("test_fr_add01")])],44 'type': 'invoice',
45 'street': 'Av Siempre Viva',
46 'phone': "(555) 5555555",
47 'fax': "(555) 1111111",
48 'email': 'fakemail@example.com',
50 }49 }
51 part_id = self.create(cr, uid, part)50 part_id = self.create(cr, uid, part)
52 assert part_id, 'Partner should be created'51 assert part_id, 'Partner should be created'
@@ -60,7 +59,11 @@
60 'supplier': True,59 'supplier': True,
61 'customer': True,60 'customer': True,
62 'vat': 'VEJ112223330',61 'vat': 'VEJ112223330',
63 'address': [(6, 0, [ref("test_fr_add01")])],62 'type': 'invoice',
63 'street': 'Av Siempre Viva',
64 'phone': "(555) 5555555",
65 'fax': "(555) 1111111",
66 'email': 'fakemail@example.com',
64 }67 }
65 try:68 try:
66 rollback = cr.rollback69 rollback = cr.rollback
@@ -86,7 +89,11 @@
86 'supplier': True,89 'supplier': True,
87 'customer': True,90 'customer': True,
88 'vat': 'VEJ223334445',91 'vat': 'VEJ223334445',
89 'address': [(6, 0, [ref("test_fr_add01")])],92 'type': 'invoice',
93 'street': 'Av Siempre Viva',
94 'phone': "(555) 5555555",
95 'fax': "(555) 1111111",
96 'email': 'fakemail@example.com',
90 }97 }
91 try:98 try:
92 rollback = cr.rollback99 rollback = cr.rollback
93100
=== modified file 'l10n_ve_fiscal_requirements/view/account_inv_refund_nctrl_view.xml'
--- l10n_ve_fiscal_requirements/view/account_inv_refund_nctrl_view.xml 2012-11-06 22:01:07 +0000
+++ l10n_ve_fiscal_requirements/view/account_inv_refund_nctrl_view.xml 2013-01-14 19:15:27 +0000
@@ -5,7 +5,6 @@
5 <record id="view_account_inv_nctrl_refund" model="ir.ui.view">5 <record id="view_account_inv_nctrl_refund" model="ir.ui.view">
6 <field name="name">account.inv.nctrl.refund.form</field>6 <field name="name">account.inv.nctrl.refund.form</field>
7 <field name="model">account.invoice.refund</field>7 <field name="model">account.invoice.refund</field>
8 <field name="type">form</field>
9 <field name="inherit_id" ref="account.view_account_invoice_refund"/>8 <field name="inherit_id" ref="account.view_account_invoice_refund"/>
10 <field name="arch" type="xml">9 <field name="arch" type="xml">
11 <xpath expr="//field[@name='period']" position="after">10 <xpath expr="//field[@name='period']" position="after">
1211
=== modified file 'l10n_ve_fiscal_requirements/view/account_invoice_view.xml'
--- l10n_ve_fiscal_requirements/view/account_invoice_view.xml 2012-12-04 22:37:47 +0000
+++ l10n_ve_fiscal_requirements/view/account_invoice_view.xml 2013-01-14 19:15:27 +0000
@@ -10,7 +10,6 @@
10 <record id="account_invoice_ext_view_form_loc_ve" model="ir.ui.view">10 <record id="account_invoice_ext_view_form_loc_ve" model="ir.ui.view">
11 <field name="name">invoice_extended.account.invoice.form.loc_ve</field>11 <field name="name">invoice_extended.account.invoice.form.loc_ve</field>
12 <field name="model">account.invoice</field>12 <field name="model">account.invoice</field>
13 <field name="type">form</field>
14 <field name="inherit_id" ref="account.invoice_form"/>13 <field name="inherit_id" ref="account.invoice_form"/>
15 <field name="arch" type="xml">14 <field name="arch" type="xml">
16 <xpath expr="//field[@name='date_invoice']" position="replace">15 <xpath expr="//field[@name='date_invoice']" position="replace">
@@ -91,7 +90,6 @@
91 <record id="account_inv_ext_view_tree_crdr" model="ir.ui.view">90 <record id="account_inv_ext_view_tree_crdr" model="ir.ui.view">
92 <field name="name">invoice_extended.tree.crdr</field>91 <field name="name">invoice_extended.tree.crdr</field>
93 <field name="model">account.invoice</field>92 <field name="model">account.invoice</field>
94 <field name="type">tree</field>
95 <field name="inherit_id" ref="account.invoice_tree"/>93 <field name="inherit_id" ref="account.invoice_tree"/>
96 <field name="arch" type="xml">94 <field name="arch" type="xml">
97 <xpath expr="//field[@name='origin']" position="after">95 <xpath expr="//field[@name='origin']" position="after">
@@ -109,7 +107,6 @@
109 <record id="account_invoice_ext_view_supp_form_loc_ve" model="ir.ui.view">107 <record id="account_invoice_ext_view_supp_form_loc_ve" model="ir.ui.view">
110 <field name="name">invoice_extended.account.invoice.supplier.form.loc_ve</field>108 <field name="name">invoice_extended.account.invoice.supplier.form.loc_ve</field>
111 <field name="model">account.invoice</field>109 <field name="model">account.invoice</field>
112 <field name="type">form</field>
113 <field name="inherit_id" ref="account.invoice_supplier_form"/>110 <field name="inherit_id" ref="account.invoice_supplier_form"/>
114 <field name="arch" type="xml">111 <field name="arch" type="xml">
115 <xpath expr="//field[@name='date_invoice']" position="replace">112 <xpath expr="//field[@name='date_invoice']" position="replace">
116113
=== modified file 'l10n_ve_fiscal_requirements/view/account_tax_view.xml'
--- l10n_ve_fiscal_requirements/view/account_tax_view.xml 2012-11-07 21:33:58 +0000
+++ l10n_ve_fiscal_requirements/view/account_tax_view.xml 2013-01-14 19:15:27 +0000
@@ -13,7 +13,6 @@
13 <record id="account_tax_applicability_2" model="ir.ui.view">13 <record id="account_tax_applicability_2" model="ir.ui.view">
14 <field name="name">account.tax.applicability</field>14 <field name="name">account.tax.applicability</field>
15 <field name="model">account.tax</field>15 <field name="model">account.tax</field>
16 <field name="type">form</field>
17 <field name="inherit_id" ref="account.view_tax_form"/>16 <field name="inherit_id" ref="account.view_tax_form"/>
18 <field name="arch" type="xml">17 <field name="arch" type="xml">
19 <xpath expr="//field[@name='active']" position="after">18 <xpath expr="//field[@name='active']" position="after">
2019
=== modified file 'l10n_ve_fiscal_requirements/view/l10n_ut_view.xml'
--- l10n_ve_fiscal_requirements/view/l10n_ut_view.xml 2012-11-06 22:01:07 +0000
+++ l10n_ve_fiscal_requirements/view/l10n_ut_view.xml 2013-01-14 19:15:27 +0000
@@ -5,7 +5,6 @@
5 <record id="view_l10n_ut_filter" model="ir.ui.view">5 <record id="view_l10n_ut_filter" model="ir.ui.view">
6 <field name="name">l10n.ut.search</field>6 <field name="name">l10n.ut.search</field>
7 <field name="model">l10n.ut</field>7 <field name="model">l10n.ut</field>
8 <field name="type">search</field>
9 <field name="arch" type="xml">8 <field name="arch" type="xml">
10 <search string="Search Tax Unit" version="7.0">9 <search string="Search Tax Unit" version="7.0">
11 <group col="10" colspan="4">10 <group col="10" colspan="4">
@@ -24,7 +23,6 @@
24 <record model="ir.ui.view" id="view_l10n_ut_form">23 <record model="ir.ui.view" id="view_l10n_ut_form">
25 <field name="name">l10n.ut.form</field>24 <field name="name">l10n.ut.form</field>
26 <field name="model">l10n.ut</field>25 <field name="model">l10n.ut</field>
27 <field name="type">form</field>
28 <field name="arch" type="xml">26 <field name="arch" type="xml">
29 <form string="Tax Unit" version="7.0">27 <form string="Tax Unit" version="7.0">
30 <group col="6" colspan="4">28 <group col="6" colspan="4">
@@ -39,7 +37,6 @@
39 <record model="ir.ui.view" id="view_l10n_ut_tree">37 <record model="ir.ui.view" id="view_l10n_ut_tree">
40 <field name="name">l10n.ut.tree</field>38 <field name="name">l10n.ut.tree</field>
41 <field name="model">l10n.ut</field>39 <field name="model">l10n.ut</field>
42 <field name="type">tree</field>
43 <field name="arch" type="xml">40 <field name="arch" type="xml">
44 <tree string="Tax Unit per date" editable="top">41 <tree string="Tax Unit per date" editable="top">
45 <field name="name"/>42 <field name="name"/>
4643
=== modified file 'l10n_ve_fiscal_requirements/view/partner_view.xml'
--- l10n_ve_fiscal_requirements/view/partner_view.xml 2012-12-09 23:00:04 +0000
+++ l10n_ve_fiscal_requirements/view/partner_view.xml 2013-01-14 19:15:27 +0000
@@ -5,7 +5,6 @@
5 <record id="view_partner_form2" model="ir.ui.view">5 <record id="view_partner_form2" model="ir.ui.view">
6 <field name="name">res.partner.vat.inherit2</field>6 <field name="name">res.partner.vat.inherit2</field>
7 <field name="model">res.partner</field>7 <field name="model">res.partner</field>
8 <field name="type">form</field>
9 <field name="inherit_id" ref="base.view_partner_form"/>8 <field name="inherit_id" ref="base.view_partner_form"/>
10 <field name="arch" type="xml">9 <field name="arch" type="xml">
1110
1211
=== modified file 'l10n_ve_fiscal_requirements/wizard/account_invoice_debit.py'
--- l10n_ve_fiscal_requirements/wizard/account_invoice_debit.py 2012-12-04 19:17:53 +0000
+++ l10n_ve_fiscal_requirements/wizard/account_invoice_debit.py 2013-01-14 19:15:27 +0000
@@ -81,19 +81,6 @@
81 res['fields'][field]['selection'] = journal_select81 res['fields'][field]['selection'] = journal_select
82 return res82 return res
8383
84 def _get_period(self, cr, uid, context=None):
85 """
86 Return default account period value
87 """
88 if context is None:
89 context = {}
90 account_period_obj = self.pool.get('account.period')
91 ids = account_period_obj.find(cr, uid, context=context)
92 period_id = False
93 if ids:
94 period_id = ids[0]
95 return period_id
96
97 def _get_orig(self, cr, uid, inv, ref, context=None):84 def _get_orig(self, cr, uid, inv, ref, context=None):
98 """85 """
99 Return default origin value86 Return default origin value
@@ -130,45 +117,39 @@
130 date = False117 date = False
131 period = False118 period = False
132 description = False119 description = False
133 company = res_users_obj.browse(cr, uid, uid, context=context).company_id120
134 journal_id = form.journal_id and form.journal_id.id or False121 journal_id = form.journal_id and form.journal_id.id or False
135 inv = inv_obj.browse(cr, uid, context.get('active_ids')[0], context=context)122 inv = inv_obj.browse(cr, uid, context.get('active_ids')[0], context=context)
123 #~ TODOK: no seria mejor ids=context.get(active_id)
124
125 company_id = inv.company_id.id
126 context.update({'company_id':company_id})
127
136 if inv.state in ['draft', 'proforma2', 'cancel']:128 if inv.state in ['draft', 'proforma2', 'cancel']:
137 raise osv.except_osv(_('Error !'), _('Can not create a debit note from draft/proforma/cancel invoice.'))129 raise osv.except_osv(_('Error !'), _('Can not create a debit note from draft/proforma/cancel invoice.'))
138 if inv.reconciled in ('cancel', 'modify'):130 if inv.reconciled in ('cancel', 'modify'):
139 raise osv.except_osv(_('Error !'), _('Can not create a debit note from invoice which is already reconciled, invoice should be unreconciled first. You can only Refund or Debit this invoice'))131 raise osv.except_osv(_('Error !'), _('Can not create a debit note from invoice which is already reconciled, invoice should be unreconciled first. You can only Refund or Debit this invoice'))
140 if inv.type not in ['in_invoice', 'out_invoice']:132 if inv.type not in ['in_invoice', 'out_invoice']:
141 raise osv.except_osv(_('Error !'), _('Can not make a debit note on a refund invoice.'))133 raise osv.except_osv(_('Error !'), _('Can not make a debit note on a refund invoice.'))
134
135 #Check for the form fields
136
142 if form.period:137 if form.period:
143 period = form.period.id138 period = form.period.id
144 else:139 else:
145 #Take period from the current date140 #Take period from the current date
146 #period = inv.period_id and inv.period_id.id or False141 period = self.pool.get('account.period').find(cr, uid, context=context)
147 period = self._get_period(cr, uid, context)142 period = period and period[0] or False
143 if not period:
144 raise osv.except_osv(_('No Pediod Defined'), \
145 _('You have been left empty the period field that automatically fill with the current period. However there is not period defined for the current company. Please check in Accounting/Configuration/Periods'))
146 self.write(cr, uid, ids, {'period': period }, context=context)
148147
149 if not journal_id:148 if not journal_id:
150 journal_id = inv.journal_id.id149 journal_id = inv.journal_id.id
151150
152 if form.date:151 if form.date:
153 date = form.date152 date = form.date
154 if not form.period.id:
155 cr.execute("select name from ir_model_fields \
156 where model = 'account.period' \
157 and name = 'company_id'")
158 result_query = cr.fetchone()
159 if result_query:
160 #in multi company mode
161 cr.execute("""select p.id from account_fiscalyear y, account_period p where y.id=p.fiscalyear_id \
162 and date(%s) between p.date_start AND p.date_stop and y.company_id = %s limit 1""", (date, company.id,))
163 else:
164 #in mono company mode
165 cr.execute("""SELECT id
166 from account_period where date(%s)
167 between date_start AND date_stop \
168 limit 1 """, (date,))
169 res = cr.fetchone()
170 if res:
171 period = res[0]
172 else:153 else:
173 #Take current date154 #Take current date
174 #date = inv.date_invoice155 #date = inv.date_invoice
@@ -178,10 +159,6 @@
178 else:159 else:
179 description = inv.name160 description = inv.name
180161
181 if not period:
182 raise osv.except_osv(_('Data Insufficient !'), \
183 _('No Period found on Invoice!'))
184
185 #we get original data of invoice to create a new invoice that is the copy of the original162 #we get original data of invoice to create a new invoice that is the copy of the original
186 invoice = inv_obj.read(cr, uid, [inv.id],163 invoice = inv_obj.read(cr, uid, [inv.id],
187 ['name', 'type', 'number', 'reference',164 ['name', 'type', 'number', 'reference',
188165
=== modified file 'l10n_ve_fiscal_requirements/wizard/account_invoice_debit_view.xml'
--- l10n_ve_fiscal_requirements/wizard/account_invoice_debit_view.xml 2012-11-06 22:01:07 +0000
+++ l10n_ve_fiscal_requirements/wizard/account_invoice_debit_view.xml 2013-01-14 19:15:27 +0000
@@ -5,7 +5,6 @@
5 <record id="view_account_invoice_debit" model="ir.ui.view">5 <record id="view_account_invoice_debit" model="ir.ui.view">
6 <field name="name">account.invoice.debit.form</field>6 <field name="name">account.invoice.debit.form</field>
7 <field name="model">account.invoice.debit</field>7 <field name="model">account.invoice.debit</field>
8 <field name="type">form</field>
9 <field name="arch" type="xml">8 <field name="arch" type="xml">
10 <form string="Debit Note" version="7.0">9 <form string="Debit Note" version="7.0">
11 <separator string="Debit Note Options" colspan="4"/>10 <separator string="Debit Note Options" colspan="4"/>
1211
=== modified file 'l10n_ve_fiscal_requirements/wizard/account_invoice_parent_view.xml'
--- l10n_ve_fiscal_requirements/wizard/account_invoice_parent_view.xml 2011-11-10 15:21:35 +0000
+++ l10n_ve_fiscal_requirements/wizard/account_invoice_parent_view.xml 2013-01-14 19:15:27 +0000
@@ -5,7 +5,6 @@
5 <record id="view_account_invoice_parent" model="ir.ui.view">5 <record id="view_account_invoice_parent" model="ir.ui.view">
6 <field name="name">account.invoice.parent.form</field>6 <field name="name">account.invoice.parent.form</field>
7 <field name="model">account.invoice.parent</field>7 <field name="model">account.invoice.parent</field>
8 <field name="type">form</field>
9 <field name="arch" type="xml">8 <field name="arch" type="xml">
10 <form string="Debit Note">9 <form string="Debit Note">
11 <separator string="Debit Note Options" colspan="4"/>10 <separator string="Debit Note Options" colspan="4"/>
1211
=== modified file 'l10n_ve_fiscal_requirements/wizard/account_invoice_refund.py'
--- l10n_ve_fiscal_requirements/wizard/account_invoice_refund.py 2012-11-07 15:19:17 +0000
+++ l10n_ve_fiscal_requirements/wizard/account_invoice_refund.py 2013-01-14 19:15:27 +0000
@@ -79,21 +79,6 @@
79 res['fields'][field]['selection'] = journal_select79 res['fields'][field]['selection'] = journal_select
80 return res80 return res
8181
82 def _get_period(self, cr, uid, context={}):
83 """
84 Return default account period value
85 """
86 period_id= False
87 if context.get('active_id',False):
88 invo_obj = self.pool.get('account.invoice')
89 invo_brw = invo_obj.browse(cr,uid,context.get('active_id'),{})
90 period_id = invo_brw and invo_brw.period_id and invo_brw.period_id.id
91 return period_id
92
93
94
95 return period_id
96
97 def _get_orig(self, cr, uid, inv, ref, context={}):82 def _get_orig(self, cr, uid, inv, ref, context={}):
98 """83 """
99 Return default origin value84 Return default origin value
@@ -165,8 +150,15 @@
165 raise osv.except_osv(_('Error !'), _('Can not %s draft/proforma/cancel invoice.') % (mode))150 raise osv.except_osv(_('Error !'), _('Can not %s draft/proforma/cancel invoice.') % (mode))
166 if inv.reconciled and mode in ('cancel', 'modify'):151 if inv.reconciled and mode in ('cancel', 'modify'):
167 raise osv.except_osv(_('Error !'), _('Can not %s invoice which is already reconciled, invoice should be unreconciled first. You can only Refund this invoice') % (mode))152 raise osv.except_osv(_('Error !'), _('Can not %s invoice which is already reconciled, invoice should be unreconciled first. You can only Refund this invoice') % (mode))
168 #Take period from the current date153 period = form.get('period') and form.get('period')[0] or False
169 period = form.get('period') and form.get('period')[0] or self._get_period(cr, uid, context)154 if not period:
155 #Take period from the current date
156 period = self.pool.get('account.period').find(cr, uid, context=context)
157 period = period and period[0] or False
158 if not period:
159 raise osv.except_osv(_('No Pediod Defined'), \
160 _('You have been left empty the period field that automatically fill with the current period. However there is not period defined for the current company. Please check in Accounting/Configuration/Periods'))
161 self.write(cr, uid, ids, {'period': period }, context=context)
170162
171 if not journal_brw:163 if not journal_brw:
172 journal_id = inv.journal_id.id164 journal_id = inv.journal_id.id
@@ -253,9 +245,10 @@
253 'journal_id', 'period_id'], context=context)245 'journal_id', 'period_id'], context=context)
254 invoice = invoice[0]246 invoice = invoice[0]
255 del invoice['id']247 del invoice['id']
256 invoice_lines = inv_line_obj.read(cr, uid, invoice['invoice_line'], context=context)248 invoice_lines = inv_line_obj.browse(cr, uid, invoice['invoice_line'], context=context)
249
257 invoice_lines = inv_obj._refund_cleanup_lines(cr, uid, invoice_lines)250 invoice_lines = inv_obj._refund_cleanup_lines(cr, uid, invoice_lines)
258 tax_lines = inv_tax_obj.read(cr, uid, invoice['tax_line'], context=context)251 tax_lines = inv_tax_obj.browse(cr, uid, invoice['tax_line'], context=context)
259 tax_lines = inv_obj._refund_cleanup_lines(cr, uid, tax_lines)252 tax_lines = inv_obj._refund_cleanup_lines(cr, uid, tax_lines)
260 #Add origin value253 #Add origin value
261 orig = self._get_orig(cr, uid, inv, invoice['reference'], context)254 orig = self._get_orig(cr, uid, inv, invoice['reference'], context)
@@ -283,12 +276,12 @@
283 276
284 new_inv_brw = inv_obj.browse(cr,uid,created_inv[1],context=context)277 new_inv_brw = inv_obj.browse(cr,uid,created_inv[1],context=context)
285 inv_obj.write(cr,uid,created_inv[0],{'name':wzd_brw.description,'origin':new_inv_brw.origin},context=context)278 inv_obj.write(cr,uid,created_inv[0],{'name':wzd_brw.description,'origin':new_inv_brw.origin},context=context)
286 inv_obj.write(cr,uid,created_inv[1],{'origin':inv.origin,'description':''},context=context)279 inv_obj.write(cr,uid,created_inv[1],{'origin':inv.origin,'name':wzd_brw.description},context=context)
287 if inv.type in ('out_invoice', 'out_refund'):280 if inv.type in ('out_invoice', 'out_refund'):
288 xml_id = 'action_invoice_tree3'281 xml_id = 'action_invoice_tree3'
289 if hasattr(inv, 'sale_ids'):282 #~ if hasattr(inv, 'sale_ids'):
290 for i in inv.sale_ids:283 #~ for i in inv.sale_ids:
291 cr.execute('insert into sale_order_invoice_rel (order_id,invoice_id) values (%s,%s)', (i.id, refund_id[0]))284 #~ cr.execute('insert into sale_order_invoice_rel (order_id,invoice_id) values (%s,%s)', (i.id, refund_id[0]))
292 else:285 else:
293 xml_id = 'action_invoice_tree4'286 xml_id = 'action_invoice_tree4'
294 result = mod_obj.get_object_reference(cr, uid, 'account', xml_id)287 result = mod_obj.get_object_reference(cr, uid, 'account', xml_id)
@@ -300,11 +293,11 @@
300 293
301 if wzd_brw.filter_refund == 'cancel':294 if wzd_brw.filter_refund == 'cancel':
302 orig = self._get_orig(cr, uid, inv, inv.reference, context)295 orig = self._get_orig(cr, uid, inv, inv.reference, context)
303 inv_obj.write(cr,uid,created_inv[0],{'origin':orig,'description':wzd_brw.description},context=context)296 inv_obj.write(cr,uid,created_inv[0],{'origin':orig,'name':wzd_brw.description},context=context)
304 297
305 if wzd_brw.filter_refund == 'refund':298 if wzd_brw.filter_refund == 'refund':
306 orig = self._get_orig(cr, uid, inv, inv.reference, context)299 orig = self._get_orig(cr, uid, inv, inv.reference, context)
307 inv_obj.write(cr,uid,created_inv[0],{'origin':inv.origin,'description':wzd_brw.description},context=context)300 inv_obj.write(cr,uid,created_inv[0],{'origin':inv.origin,'name':wzd_brw.description},context=context)
308 return result301 return result
309302
310 def validate_total_payment_inv(self, cr, uid, ids, context=None):303 def validate_total_payment_inv(self, cr, uid, ids, context=None):
@@ -354,7 +347,7 @@
354 if moveline.reconcile_partial_id:347 if moveline.reconcile_partial_id:
355 rec += [moveline.reconcile_partial_id.id]348 rec += [moveline.reconcile_partial_id.id]
356 movelines = moveline_obj.search(cr, uid, [('|'),('reconcile_id','in',rec),('reconcile_partial_id','in',rec)],context=context)349 movelines = moveline_obj.search(cr, uid, [('|'),('reconcile_id','in',rec),('reconcile_partial_id','in',rec)],context=context)
357 for mids in moveline_obj.browse(cr, uid, movelines, ['move_id']):350 for mids in moveline_obj.browse(cr, uid, movelines, context=context):
358 mid +=[mids.move_id.id]351 mid +=[mids.move_id.id]
359 voucherids = voucher_pool.search(cr, uid,[('move_id','in',mid)])352 voucherids = voucher_pool.search(cr, uid,[('move_id','in',mid)])
360 if voucherids:353 if voucherids:
361354
=== modified file 'l10n_ve_fiscal_requirements/wizard/search_info_partner_seniat.py'
--- l10n_ve_fiscal_requirements/wizard/search_info_partner_seniat.py 2012-12-02 17:44:27 +0000
+++ l10n_ve_fiscal_requirements/wizard/search_info_partner_seniat.py 2013-01-14 19:15:27 +0000
@@ -19,7 +19,6 @@
19# along with this program. If not, see <http://www.gnu.org/licenses/>.19# along with this program. If not, see <http://www.gnu.org/licenses/>.
20#20#
21##############################################################################21##############################################################################
22import wizard
23import pooler22import pooler
24from osv import osv, fields23from osv import osv, fields
25from tools.translate import _24from tools.translate import _
2625
=== modified file 'l10n_ve_fiscal_requirements/wizard/search_info_partner_seniat.xml'
--- l10n_ve_fiscal_requirements/wizard/search_info_partner_seniat.xml 2012-09-26 21:07:02 +0000
+++ l10n_ve_fiscal_requirements/wizard/search_info_partner_seniat.xml 2013-01-14 19:15:27 +0000
@@ -4,7 +4,6 @@
4 <record model="ir.ui.view" id="view_vat_search">4 <record model="ir.ui.view" id="view_vat_search">
5 <field name="name">search.info.partner.seniat.form</field>5 <field name="name">search.info.partner.seniat.form</field>
6 <field name="model">search.info.partner.seniat</field>6 <field name="model">search.info.partner.seniat</field>
7 <field name="type">form</field>
8 <field name="arch" type="xml">7 <field name="arch" type="xml">
9 <form string="Wizard to search partner on SENIAT">8 <form string="Wizard to search partner on SENIAT">
10 <group colspan="4">9 <group colspan="4">
1110
=== modified file 'l10n_ve_fiscal_requirements/wizard/update_info_partner.py'
--- l10n_ve_fiscal_requirements/wizard/update_info_partner.py 2012-12-02 18:34:29 +0000
+++ l10n_ve_fiscal_requirements/wizard/update_info_partner.py 2013-01-14 19:15:27 +0000
@@ -19,7 +19,6 @@
19# along with this program. If not, see <http://www.gnu.org/licenses/>.19# along with this program. If not, see <http://www.gnu.org/licenses/>.
20#20#
21##############################################################################21##############################################################################
22import wizard
23import pooler22import pooler
24from osv import osv, fields23from osv import osv, fields
25from tools.translate import _24from tools.translate import _
2625
=== modified file 'l10n_ve_fiscal_requirements/wizard/update_info_partner.xml'
--- l10n_ve_fiscal_requirements/wizard/update_info_partner.xml 2011-10-25 20:33:16 +0000
+++ l10n_ve_fiscal_requirements/wizard/update_info_partner.xml 2013-01-14 19:15:27 +0000
@@ -7,7 +7,6 @@
7 <record id="view_wizard_update_info_partner" model="ir.ui.view">7 <record id="view_wizard_update_info_partner" model="ir.ui.view">
8 <field name="name">view.update.info.partner</field>8 <field name="name">view.update.info.partner</field>
9 <field name="model">update.info.partner</field>9 <field name="model">update.info.partner</field>
10 <field name="type">form</field>
11 <field name="arch" type="xml">10 <field name="arch" type="xml">
12 <form string="">11 <form string="">
13 <separator string="Are you sure you want to do this?" colspan="4"/>12 <separator string="Are you sure you want to do this?" colspan="4"/>
1413
=== modified file 'l10n_ve_fiscal_requirements/wizard/wizard_invoice_nro_ctrl_view.xml'
--- l10n_ve_fiscal_requirements/wizard/wizard_invoice_nro_ctrl_view.xml 2012-04-11 21:48:15 +0000
+++ l10n_ve_fiscal_requirements/wizard/wizard_invoice_nro_ctrl_view.xml 2013-01-14 19:15:27 +0000
@@ -4,7 +4,6 @@
4 <record id="view_wizard_invoice_nro_ctrl" model="ir.ui.view">4 <record id="view_wizard_invoice_nro_ctrl" model="ir.ui.view">
5 <field name="name">view.wizard.invoice.nro.ctrl</field>5 <field name="name">view.wizard.invoice.nro.ctrl</field>
6 <field name="model">wizard.invoice.nro.ctrl</field>6 <field name="model">wizard.invoice.nro.ctrl</field>
7 <field name="type">form</field>
8 <field name="arch" type="xml">7 <field name="arch" type="xml">
9 <form string="Create an invoice to justify the damaged one">8 <form string="Create an invoice to justify the damaged one">
10 <group colspan="8" col="8">9 <group colspan="8" col="8">
1110
=== modified file 'l10n_ve_fiscal_requirements/wizard/wizard_nro_ctrl_view.xml'
--- l10n_ve_fiscal_requirements/wizard/wizard_nro_ctrl_view.xml 2012-02-09 21:33:03 +0000
+++ l10n_ve_fiscal_requirements/wizard/wizard_nro_ctrl_view.xml 2013-01-14 19:15:27 +0000
@@ -4,7 +4,6 @@
4 <record model="ir.ui.view" id="wizard_nro_ctrl_form">4 <record model="ir.ui.view" id="wizard_nro_ctrl_form">
5 <field name="name">wizard.nro.ctrl.form</field>5 <field name="name">wizard.nro.ctrl.form</field>
6 <field name="model">wiz.nroctrl</field>6 <field name="model">wiz.nroctrl</field>
7 <field name="type">form</field>
8 <field name="arch" type="xml">7 <field name="arch" type="xml">
9 <form string="Changing the Control Number">8 <form string="Changing the Control Number">
10 <field name="name" />9 <field name="name" />
1110
=== modified file 'l10n_ve_fiscal_requirements/wizard/wizard_url_seniat_view.xml'
--- l10n_ve_fiscal_requirements/wizard/wizard_url_seniat_view.xml 2012-07-16 18:55:40 +0000
+++ l10n_ve_fiscal_requirements/wizard/wizard_url_seniat_view.xml 2013-01-14 19:15:27 +0000
@@ -4,7 +4,6 @@
4 <record id="view_wizard_url_seniat" model="ir.ui.view">4 <record id="view_wizard_url_seniat" model="ir.ui.view">
5 <field name="name">view.wizard.seniat.url</field>5 <field name="name">view.wizard.seniat.url</field>
6 <field name="model">wizard.seniat.url</field>6 <field name="model">wizard.seniat.url</field>
7 <field name="type">form</field>
8 <field name="arch" type="xml">7 <field name="arch" type="xml">
9 <form string="Update Url From Seniat">8 <form string="Update Url From Seniat">
10 <separator string="URL Seniat for Partner Information" colspan="4"/>9 <separator string="URL Seniat for Partner Information" colspan="4"/>
1110
=== modified file 'l10n_ve_withholding/test/wh_pay_invoice.yml'
--- l10n_ve_withholding/test/wh_pay_invoice.yml 2012-09-27 21:43:13 +0000
+++ l10n_ve_withholding/test/wh_pay_invoice.yml 2013-01-14 19:15:27 +0000
@@ -14,14 +14,14 @@
14 journal_id = self.default_get(cr, uid, ['journal_id']).get('journal_id',None)14 journal_id = self.default_get(cr, uid, ['journal_id']).get('journal_id',None)
15 res = self.onchange_partner_id(cr, uid, [], inv_brw.partner_id.id, journal_id, 0.0, 1, ttype='receipt', date=False)15 res = self.onchange_partner_id(cr, uid, [], inv_brw.partner_id.id, journal_id, 0.0, 1, ttype='receipt', date=False)
16 ap_obj = self.pool.get('account.period')16 ap_obj = self.pool.get('account.period')
17 period = ap_obj.find(cr, uid, time.strftime('%Y/%m/%d'), context={'company_id':ref("base.main_company")})17 period = ap_obj.find(cr, uid, time.strftime('%Y/%m/%d'), context={'company_id':ref("base.main_company")})[0]
18 vals = {18 vals = {
19 'account_id': ref('account.cash'),19 'account_id': ref('account.cash'),
20 'amount': inv_brw.amount,20 'amount': inv_brw.amount_total,
21 'company_id': ref('base.main_company'),21 'company_id': ref('base.main_company'),
22 'currency_id': ref('base.EUR'),22 'currency_id': ref('base.EUR'),
23 'journal_id': ref('account.bank_journal'),23 'journal_id': ref('account.bank_journal'),
24 'partner_id': ref('inv_brw.partner_id.id'),24 'partner_id': inv_brw.partner_id.id,
25 'period_id': period,25 'period_id': period,
26 'type': 'receipt',26 'type': 'receipt',
27 }27 }
@@ -39,9 +39,10 @@
39 1.2 I check that the invoice state is "Open"39 1.2 I check that the invoice state is "Open"
40-40-
41 !python {model: account.voucher}: |41 !python {model: account.voucher}: |
42 import time
42 inv_obj = self.pool.get("account.invoice")43 inv_obj = self.pool.get("account.invoice")
43 inv_brw = inv_obj.browse(cr, uid, ref("l10n_ve_fiscal_requirements.test_fr01"))44 inv_brw = inv_obj.browse(cr, uid, ref("l10n_ve_fiscal_requirements.test_fr01"))
44 lines = inv_brw.invoice_line45 lines = inv_brw.invoice_line
45 data = self.onchange_journal(cr, uid, [ref("l10n_ve_fiscal_requirements.test_fr01")], 5, lines, False, 46 data = self.onchange_journal(cr, uid, [ref("l10n_ve_fiscal_requirements.test_fr01")], 5, lines, False,
46 inv_brw.partner_id, time.strftime('%Y-%m-%d'), 47 inv_brw.partner_id.id, time.strftime('%Y-%m-%d'),
47 inv_brw.amount, ttype, base.main_company, context=None)48 inv_brw.amount_total, 'receipt', ref('base.main_company'), context=None)
4849
=== modified file 'l10n_ve_withholding/view/account_view.xml'
--- l10n_ve_withholding/view/account_view.xml 2012-12-10 12:16:26 +0000
+++ l10n_ve_withholding/view/account_view.xml 2013-01-14 19:15:27 +0000
@@ -24,6 +24,7 @@
24 </field>24 </field>
25 </record>25 </record>
2626
27<!--
27 <record id="view_move_line_tax_tree_iva" model="ir.ui.view">28 <record id="view_move_line_tax_tree_iva" model="ir.ui.view">
28 <field name="name">account.move.line.tax.tree.iva</field>29 <field name="name">account.move.line.tax.tree.iva</field>
29 <field name="model">account.move.line</field>30 <field name="model">account.move.line</field>
@@ -36,6 +37,7 @@
36 </field>37 </field>
37 </field>38 </field>
38 </record>39 </record>
40-->
3941
40 42
41 <record id="view_move_form_iva" model="ir.ui.view">43 <record id="view_move_form_iva" model="ir.ui.view">
4244
=== modified file 'l10n_ve_withholding_islr/__init__.py'
--- l10n_ve_withholding_islr/__init__.py 2012-12-09 23:55:45 +0000
+++ l10n_ve_withholding_islr/__init__.py 2013-01-14 19:15:27 +0000
@@ -28,4 +28,4 @@
28import model 28import model
29import report29import report
30import wizard30import wizard
31import edi31#import edi
3232
=== modified file 'l10n_ve_withholding_islr/__openerp__.py'
--- l10n_ve_withholding_islr/__openerp__.py 2012-12-18 17:46:39 +0000
+++ l10n_ve_withholding_islr/__openerp__.py 2013-01-14 19:15:27 +0000
@@ -27,16 +27,16 @@
27##############################################################################27##############################################################################
2828
29{29{
30 "name" : "Automatically Calculation Withholding Income",30 "name" : "Automatically Calculation Income Withholding",
31 "version" : "0.1",31 "version" : "0.1",
32 "author" : "Vauxoo",32 "author" : "Vauxoo",
33 "category" : "General",33 "category" : "General",
34 "website": "http://wiki.openerp.org.ve/",34 "website": "http://wiki.openerp.org.ve/",
35 "description": ''' - Generate the voucher of withholding income to validate the invoice.35 "description": ''' - Generate the voucher of income withholding to validate the invoice.
36 - Generate the report of voucher of withholding income.36 - Generate the report of voucher of income withholding.
37 - Generate the file .xml required by the Venezuelan laws, for agent of withholding income specials.37 - Generate the file .xml required by the Venezuelan laws, for agent of income withholding specials.
38 - Generate view for load the concepts of wittholding whith their rates.38 - Generate view for load the concepts of wittholding whith their rates.
39 - Generate view for visualize the withholding income for suppilers and customers.39 - Generate view for visualize the income withholding for suppilers and customers.
40 - Load data of the 86 concepts of wittholdings whith their rates.40 - Load data of the 86 concepts of wittholdings whith their rates.
41 - Send an email to supplier with approved withholdings, if not opt_out in the partner41 - Send an email to supplier with approved withholdings, if not opt_out in the partner
42If you want be able to propose withholding concepts from sales and purchases you must install extra module @section{l10n_ve_sale_purchase}.42If you want be able to propose withholding concepts from sales and purchases you must install extra module @section{l10n_ve_sale_purchase}.
@@ -63,7 +63,7 @@
63 "view/islr_xml_wh.xml",63 "view/islr_xml_wh.xml",
64 "workflow/islr_wh_workflow.xml",64 "workflow/islr_wh_workflow.xml",
65 "workflow/account_workflow.xml",65 "workflow/account_workflow.xml",
66 "edi/islr_wh_doc_action_data.xml",66 #"edi/islr_wh_doc_action_data.xml",
67 67
68 ],68 ],
69 'test': [69 'test': [
7070
=== modified file 'l10n_ve_withholding_islr/demo/retencion_islr_sequence.xml'
--- l10n_ve_withholding_islr/demo/retencion_islr_sequence.xml 2012-12-19 18:17:09 +0000
+++ l10n_ve_withholding_islr/demo/retencion_islr_sequence.xml 2013-01-14 19:15:27 +0000
@@ -4,12 +4,12 @@
44
5 <!-- Sequences type for account.retention --> 5 <!-- Sequences type for account.retention -->
6 <record id="seq_type_islr_wh" model="ir.sequence.type">6 <record id="seq_type_islr_wh" model="ir.sequence.type">
7 <field name="name">Withholding Income</field>7 <field name="name">Income Withholding</field>
8 <field name="code">islr.wh.doc</field>8 <field name="code">islr.wh.doc</field>
9 </record>9 </record>
1010
11 <record id="seq_account_wh_islr" model="ir.sequence">11 <record id="seq_account_wh_islr" model="ir.sequence">
12 <field name="name">Withholding Income</field>12 <field name="name">Income Withholding</field>
13 <field name="code">islr.wh.doc</field>13 <field name="code">islr.wh.doc</field>
14 <field name="prefix">RE:</field>14 <field name="prefix">RE:</field>
15 <field name="padding">8</field>15 <field name="padding">8</field>
@@ -17,12 +17,12 @@
17 </record>17 </record>
1818
19 <record id="seq_type_wh_islr_purchase" model="ir.sequence.type">19 <record id="seq_type_wh_islr_purchase" model="ir.sequence.type">
20 <field name="name">Purchase Withholding Income</field>20 <field name="name">Purchase Income Withholding</field>
21 <field name="code">islr.wh.doc.in_invoice</field>21 <field name="code">islr.wh.doc.in_invoice</field>
22 </record>22 </record>
2323
24 <record id="seq_wh_islr_purchase" model="ir.sequence">24 <record id="seq_wh_islr_purchase" model="ir.sequence">
25 <field name="name">Purchase Withholding Income</field>25 <field name="name">Purchase Income Withholding</field>
26 <field name="code">islr.wh.doc.in_invoice</field>26 <field name="code">islr.wh.doc.in_invoice</field>
27 <field name="prefix">%(year)s-%(month)s-</field>27 <field name="prefix">%(year)s-%(month)s-</field>
28 <field name="padding">8</field>28 <field name="padding">8</field>
@@ -30,12 +30,12 @@
30 </record>30 </record>
3131
32 <record id="seq_type_wh_islr_sales" model="ir.sequence.type">32 <record id="seq_type_wh_islr_sales" model="ir.sequence.type">
33 <field name="name">Sale Withholding Income</field>33 <field name="name">Sale Income Withholding</field>
34 <field name="code">islr.wh.doc.out_invoice</field>34 <field name="code">islr.wh.doc.out_invoice</field>
35 </record>35 </record>
3636
37 <record id="seq_wh_islr_sales" model="ir.sequence">37 <record id="seq_wh_islr_sales" model="ir.sequence">
38 <field name="name">Sale Withholding Income</field>38 <field name="name">Sale Income Withholding</field>
39 <field name="code">islr.wh.doc.out_invoice</field>39 <field name="code">islr.wh.doc.out_invoice</field>
40 <field name="prefix">%(year)s-%(month)s-</field>40 <field name="prefix">%(year)s-%(month)s-</field>
41 <field name="padding">8</field>41 <field name="padding">8</field>
4242
=== modified file 'l10n_ve_withholding_islr/i18n/es.po'
--- l10n_ve_withholding_islr/i18n/es.po 2012-02-09 19:23:11 +0000
+++ l10n_ve_withholding_islr/i18n/es.po 2013-01-14 19:15:27 +0000
@@ -22,7 +22,7 @@
2222
23#. module: l10n_ve_withholding_islr23#. module: l10n_ve_withholding_islr
24#: view:islr.wh.doc:024#: view:islr.wh.doc:0
25msgid "Print Withholding Income"25msgid "Print Income Withholding"
26msgstr "Imprimir comprobante de retenciĂ³n"26msgstr "Imprimir comprobante de retenciĂ³n"
2727
28#. module: l10n_ve_withholding_islr28#. module: l10n_ve_withholding_islr
@@ -37,7 +37,7 @@
3737
38#. module: l10n_ve_withholding_islr38#. module: l10n_ve_withholding_islr
39#: field:islr.xml.wh.doc,amount_total_ret:039#: field:islr.xml.wh.doc,amount_total_ret:0
40msgid "Withholding Income Amount Total"40msgid "Income Withholding Amount Total"
41msgstr "Monto Total de RetenciĂ³n de ISLR"41msgstr "Monto Total de RetenciĂ³n de ISLR"
4242
43#. module: l10n_ve_withholding_islr43#. module: l10n_ve_withholding_islr
@@ -53,7 +53,7 @@
53#. module: l10n_ve_withholding_islr53#. module: l10n_ve_withholding_islr
54#: code:addons/l10n_ve_withholding_islr/invoice.py:46154#: code:addons/l10n_ve_withholding_islr/invoice.py:461
55#, python-format55#, python-format
56msgid "Impossible withholding income, because the journal of withholding income for the '%s' has not been created with the type '%s'"56msgid "Impossible income withholding, because the journal of income withholding for the '%s' has not been created with the type '%s'"
57msgstr "Imposible realizar Comprobante de RetenciĂ³n ISLR, debido a que el diario de ISLR para la '%s' no ha sido creado con el tipo '%s'"57msgstr "Imposible realizar Comprobante de RetenciĂ³n ISLR, debido a que el diario de ISLR para la '%s' no ha sido creado con el tipo '%s'"
5858
59#. module: l10n_ve_withholding_islr59#. module: l10n_ve_withholding_islr
@@ -63,7 +63,7 @@
6363
64#. module: l10n_ve_withholding_islr64#. module: l10n_ve_withholding_islr
65#: help:res.partner,islr_withholding_agent:065#: help:res.partner,islr_withholding_agent:0
66msgid "Check if the partner is an agent for withholding income"66msgid "Check if the partner is an agent for income withholding"
67msgstr "Marque en caso de que la empresa sea agente de retenciĂ³n de ISLR"67msgstr "Marque en caso de que la empresa sea agente de retenciĂ³n de ISLR"
6868
69#. module: l10n_ve_withholding_islr69#. module: l10n_ve_withholding_islr
@@ -146,12 +146,12 @@
146#. module: l10n_ve_withholding_islr146#. module: l10n_ve_withholding_islr
147#: code:addons/l10n_ve_withholding_islr/invoice.py:171147#: code:addons/l10n_ve_withholding_islr/invoice.py:171
148#, python-format148#, python-format
149msgid "Impossible withholding income, because the partner '%s' has not fiscal direction set!."149msgid "Impossible income withholding, because the partner '%s' has not fiscal direction set!."
150msgstr "Imposible realizar Comprobante de RetenciĂ³n de ISLR, debido a que el partner '%s' no tiene direcciĂ³n fiscal asociada!."150msgstr "Imposible realizar Comprobante de RetenciĂ³n de ISLR, debido a que el partner '%s' no tiene direcciĂ³n fiscal asociada!."
151151
152#. module: l10n_ve_withholding_islr152#. module: l10n_ve_withholding_islr
153#: view:islr.wh.doc.line:0153#: view:islr.wh.doc.line:0
154msgid "Lines Withholding Income"154msgid "Lines Income Withholding"
155msgstr "LĂ­neas de RetenciĂ³n de ISLR"155msgstr "LĂ­neas de RetenciĂ³n de ISLR"
156156
157#. module: l10n_ve_withholding_islr157#. module: l10n_ve_withholding_islr
@@ -204,7 +204,7 @@
204204
205#. module: l10n_ve_withholding_islr205#. module: l10n_ve_withholding_islr
206#: help:wh.islr.config,journal_sale:0206#: help:wh.islr.config,journal_sale:0
207msgid "Journal for sale operations involving Withholding Income"207msgid "Journal for sale operations involving Income Withholding"
208msgstr "Diario para operaciones de venta que involucran retenciĂ³n de ISLR"208msgstr "Diario para operaciones de venta que involucran retenciĂ³n de ISLR"
209209
210#. module: l10n_ve_withholding_islr210#. module: l10n_ve_withholding_islr
@@ -230,7 +230,7 @@
230230
231#. module: l10n_ve_withholding_islr231#. module: l10n_ve_withholding_islr
232#: help:wh.islr.config,journal_purchase:0232#: help:wh.islr.config,journal_purchase:0
233msgid "Journal for purchase operations involving Withholding Income"233msgid "Journal for purchase operations involving Income Withholding"
234msgstr "Diario para operaciones de venta que involucran ISLR"234msgstr "Diario para operaciones de venta que involucran ISLR"
235235
236#. module: l10n_ve_withholding_islr236#. module: l10n_ve_withholding_islr
@@ -283,7 +283,7 @@
283#: model:ir.actions.act_window,name:l10n_ve_withholding_islr.action_wh_islr_customer283#: model:ir.actions.act_window,name:l10n_ve_withholding_islr.action_wh_islr_customer
284#: model:ir.ui.menu,name:l10n_ve_withholding_islr.menu_action_wh_islr_customer284#: model:ir.ui.menu,name:l10n_ve_withholding_islr.menu_action_wh_islr_customer
285#: view:islr.wh.doc:0285#: view:islr.wh.doc:0
286msgid "Customer Withholding Income"286msgid "Customer Income Withholding"
287msgstr "RetenciĂ³n de ISLR de Cliente"287msgstr "RetenciĂ³n de ISLR de Cliente"
288288
289#. module: l10n_ve_withholding_islr289#. module: l10n_ve_withholding_islr
@@ -298,7 +298,7 @@
298298
299#. module: l10n_ve_withholding_islr299#. module: l10n_ve_withholding_islr
300#: field:wh.islr.config,account_purchase:0300#: field:wh.islr.config,account_purchase:0
301msgid "Account Withholding Income Purchase"301msgid "Account Income Withholding Purchase"
302msgstr "Cuenta contable para ISLR (compras)"302msgstr "Cuenta contable para ISLR (compras)"
303303
304#. module: l10n_ve_withholding_islr304#. module: l10n_ve_withholding_islr
@@ -347,7 +347,7 @@
347#: model:ir.actions.act_window,name:l10n_ve_withholding_islr.action_wh_islr_supplier347#: model:ir.actions.act_window,name:l10n_ve_withholding_islr.action_wh_islr_supplier
348#: model:ir.ui.menu,name:l10n_ve_withholding_islr.menu_action_wh_islr_supplier348#: model:ir.ui.menu,name:l10n_ve_withholding_islr.menu_action_wh_islr_supplier
349#: view:islr.wh.doc:0349#: view:islr.wh.doc:0
350msgid "Supplier Withholding Income"350msgid "Supplier Income Withholding"
351msgstr "RetenciĂ³n de ISLR de Proveedores"351msgstr "RetenciĂ³n de ISLR de Proveedores"
352352
353#. module: l10n_ve_withholding_islr353#. module: l10n_ve_withholding_islr
@@ -373,7 +373,7 @@
373#. module: l10n_ve_withholding_islr373#. module: l10n_ve_withholding_islr
374#: code:addons/l10n_ve_withholding_islr/invoice.py:270374#: code:addons/l10n_ve_withholding_islr/invoice.py:270
375#, python-format375#, python-format
376msgid "Impossible withholding income,because the invoice number: '%s' has not number reference free!"376msgid "Impossible income withholding,because the invoice number: '%s' has not number reference free!"
377msgstr "Imposible realizar Comprobante de RetenciĂ³n ISLR, debido a que la factura nĂºmero: '%s' no tiene NĂºmero de Referencia Libre!"377msgstr "Imposible realizar Comprobante de RetenciĂ³n ISLR, debido a que la factura nĂºmero: '%s' no tiene NĂºmero de Referencia Libre!"
378378
379#. module: l10n_ve_withholding_islr379#. module: l10n_ve_withholding_islr
@@ -425,7 +425,7 @@
425#. module: l10n_ve_withholding_islr425#. module: l10n_ve_withholding_islr
426#: code:addons/l10n_ve_withholding_islr/islr_wh_doc.py:282426#: code:addons/l10n_ve_withholding_islr/islr_wh_doc.py:282
427#, python-format427#, python-format
428msgid "Impossible withholding income, because the account for withholding of sale is not assigned to the Concept withholding '%s'!"428msgid "Impossible income withholding, because the account for withholding of sale is not assigned to the Concept withholding '%s'!"
429msgstr "Imposible realizar RetenciĂ³n ISLR, debido a que la cuenta contable para retenciĂ³n de venta no esta asignada al Concepto '%s' !!"429msgstr "Imposible realizar RetenciĂ³n ISLR, debido a que la cuenta contable para retenciĂ³n de venta no esta asignada al Concepto '%s' !!"
430430
431#. module: l10n_ve_withholding_islr431#. module: l10n_ve_withholding_islr
@@ -441,7 +441,7 @@
441#. module: l10n_ve_withholding_islr441#. module: l10n_ve_withholding_islr
442#: code:addons/l10n_ve_withholding_islr/invoice.py:194442#: code:addons/l10n_ve_withholding_islr/invoice.py:194
443#, python-format443#, python-format
444msgid "Impossible withholding income, because the partner '%s' has not vat associated!"444msgid "Impossible income withholding, because the partner '%s' has not vat associated!"
445msgstr "Imposible realizar Comprobante de Retencion ISLR, debido a que el partner, '%s' no tiene RIF asociado!"445msgstr "Imposible realizar Comprobante de Retencion ISLR, debido a que el partner, '%s' no tiene RIF asociado!"
446446
447#. module: l10n_ve_withholding_islr447#. module: l10n_ve_withholding_islr
@@ -461,7 +461,7 @@
461461
462#. module: l10n_ve_withholding_islr462#. module: l10n_ve_withholding_islr
463#: model:ir.actions.act_window,help:l10n_ve_withholding_islr.action_wh_islr_supplier463#: model:ir.actions.act_window,help:l10n_ve_withholding_islr.action_wh_islr_supplier
464msgid "With Supplier Withholding you can manage document withholding issued to your suppliers. OpenERP can Just generate document withholding for purchase process automatically from invoices. To generate the withholding income and all accounting process you must confirm and validate the document withholding."464msgid "With Supplier Withholding you can manage document withholding issued to your suppliers. OpenERP can Just generate document withholding for purchase process automatically from invoices. To generate the income withholding and all accounting process you must confirm and validate the document withholding."
465msgstr "A travĂ©s de RetenciĂ³n de ISLR de proveedores usted prodrĂ¡ gestionar el documento de retenciĂ³n emitido para sus proveedores. OpenERP tambiĂ©n puede generar el documento de retenciĂ³n automĂ¡ticamente desde la factura de proveedor. Para generar la retenciĂ³n se debe confirmar y validar el documento de retenciĂ³n."465msgstr "A travĂ©s de RetenciĂ³n de ISLR de proveedores usted prodrĂ¡ gestionar el documento de retenciĂ³n emitido para sus proveedores. OpenERP tambiĂ©n puede generar el documento de retenciĂ³n automĂ¡ticamente desde la factura de proveedor. Para generar la retenciĂ³n se debe confirmar y validar el documento de retenciĂ³n."
466466
467#. module: l10n_ve_withholding_islr467#. module: l10n_ve_withholding_islr
@@ -537,13 +537,13 @@
537537
538#. module: l10n_ve_withholding_islr538#. module: l10n_ve_withholding_islr
539#: field:islr.xml.wh.line,islr_wh_doc_line_id:0539#: field:islr.xml.wh.line,islr_wh_doc_line_id:0
540msgid "Withholding Income Document"540msgid "Income Withholding Document"
541msgstr "Documento de RetenciĂ³n de ISLR"541msgstr "Documento de RetenciĂ³n de ISLR"
542542
543#. module: l10n_ve_withholding_islr543#. module: l10n_ve_withholding_islr
544#: code:addons/l10n_ve_withholding_islr/islr_wh_doc.py:288544#: code:addons/l10n_ve_withholding_islr/islr_wh_doc.py:288
545#, python-format545#, python-format
546msgid "Impossible withholding income, because the account for withholding of purchase is not assigned to the Concept withholding '%s'!"546msgid "Impossible income withholding, because the account for withholding of purchase is not assigned to the Concept withholding '%s'!"
547msgstr "Imposible realizar RetenciĂ³n ISLR, debido a que la cuenta contable para retenciĂ³n de compra no esta asignada al Concepto '%s' !"547msgstr "Imposible realizar RetenciĂ³n ISLR, debido a que la cuenta contable para retenciĂ³n de compra no esta asignada al Concepto '%s' !"
548548
549#. module: l10n_ve_withholding_islr549#. module: l10n_ve_withholding_islr
@@ -629,7 +629,7 @@
629629
630#. module: l10n_ve_withholding_islr630#. module: l10n_ve_withholding_islr
631#: help:account.invoice.line,concept_id:0631#: help:account.invoice.line,concept_id:0
632msgid "Concept of Withholding Income asociate this rate"632msgid "Concept of Income Withholding asociate this rate"
633msgstr "Concepto de RetenciĂ³n asociado a esta tasa"633msgstr "Concepto de RetenciĂ³n asociado a esta tasa"
634634
635#. module: l10n_ve_withholding_islr635#. module: l10n_ve_withholding_islr
@@ -649,7 +649,7 @@
649649
650#. module: l10n_ve_withholding_islr650#. module: l10n_ve_withholding_islr
651#: view:islr.wh.doc:0651#: view:islr.wh.doc:0
652msgid "Search Withholding Income"652msgid "Search Income Withholding"
653msgstr "BĂºsqueda - Documento de ISLR"653msgstr "BĂºsqueda - Documento de ISLR"
654654
655#. module: l10n_ve_withholding_islr655#. module: l10n_ve_withholding_islr
@@ -665,7 +665,7 @@
665#. module: l10n_ve_withholding_islr665#. module: l10n_ve_withholding_islr
666#: code:addons/l10n_ve_withholding_islr/installer.py:92666#: code:addons/l10n_ve_withholding_islr/installer.py:92
667#, python-format667#, python-format
668msgid "Journal Withholding Income Purchase"668msgid "Journal Income Withholding Purchase"
669msgstr "Diario ISLR para compras"669msgstr "Diario ISLR para compras"
670670
671#. module: l10n_ve_withholding_islr671#. module: l10n_ve_withholding_islr
@@ -680,12 +680,12 @@
680680
681#. module: l10n_ve_withholding_islr681#. module: l10n_ve_withholding_islr
682#: field:wh.islr.config,wh_agent:0682#: field:wh.islr.config,wh_agent:0
683msgid "Withholding Income Agent"683msgid "Income Withholding Agent"
684msgstr "Eres agente de retenciĂ³n de ISLR?"684msgstr "Eres agente de retenciĂ³n de ISLR?"
685685
686#. module: l10n_ve_withholding_islr686#. module: l10n_ve_withholding_islr
687#: model:ir.module.module,shortdesc:l10n_ve_withholding_islr.module_meta_information687#: model:ir.module.module,shortdesc:l10n_ve_withholding_islr.module_meta_information
688msgid "Automatically Calculation Withholding Income"688msgid "Automatically Calculation Income Withholding"
689msgstr "Calculo AutomĂ¡tico de Impuesto Sobre la Renta (ISLR)"689msgstr "Calculo AutomĂ¡tico de Impuesto Sobre la Renta (ISLR)"
690690
691#. module: l10n_ve_withholding_islr691#. module: l10n_ve_withholding_islr
@@ -701,7 +701,7 @@
701701
702#. module: l10n_ve_withholding_islr702#. module: l10n_ve_withholding_islr
703#: model:ir.actions.act_window,help:l10n_ve_withholding_islr.action_wh_islr_concept703#: model:ir.actions.act_window,help:l10n_ve_withholding_islr.action_wh_islr_concept
704msgid "With \"Concept of Withholding Income\" you can create and manage the concept of wittholding income. For each concept is to create and manage rates associated."704msgid "With \"Concept of Income Withholding\" you can create and manage the concept of wittholding income. For each concept is to create and manage rates associated."
705msgstr "A travĂ©s de \"Concepto de RetenciĂ³n de ISLR\" usted podrĂ¡ crear y gestionar los conceptos de retenciĂ³n de ISLR. Por cada concepto se puede crear y gestionar las tasas asociadas."705msgstr "A travĂ©s de \"Concepto de RetenciĂ³n de ISLR\" usted podrĂ¡ crear y gestionar los conceptos de retenciĂ³n de ISLR. Por cada concepto se puede crear y gestionar las tasas asociadas."
706706
707#. module: l10n_ve_withholding_islr707#. module: l10n_ve_withholding_islr
@@ -712,7 +712,7 @@
712712
713#. module: l10n_ve_withholding_islr713#. module: l10n_ve_withholding_islr
714#: model:ir.model,name:l10n_ve_withholding_islr.model_islr_wh_doc_line714#: model:ir.model,name:l10n_ve_withholding_islr.model_islr_wh_doc_line
715msgid "Lines of Document Withholding Income"715msgid "Lines of Document Income Withholding"
716msgstr "LĂ­neas del Documento de RetenciĂ³n de ISLR"716msgstr "LĂ­neas del Documento de RetenciĂ³n de ISLR"
717717
718#. module: l10n_ve_withholding_islr718#. module: l10n_ve_withholding_islr
@@ -757,7 +757,7 @@
757#. module: l10n_ve_withholding_islr757#. module: l10n_ve_withholding_islr
758#: model:ir.actions.report.xml,name:l10n_ve_withholding_islr.list_report_withholding_islr758#: model:ir.actions.report.xml,name:l10n_ve_withholding_islr.list_report_withholding_islr
759#: model:ir.ui.menu,name:l10n_ve_withholding_islr.menu_wh_configuration_islr759#: model:ir.ui.menu,name:l10n_ve_withholding_islr.menu_wh_configuration_islr
760msgid "Withholding Income"760msgid "Income Withholding"
761msgstr "RetenciĂ³n de ISLR"761msgstr "RetenciĂ³n de ISLR"
762762
763#. module: l10n_ve_withholding_islr763#. module: l10n_ve_withholding_islr
@@ -777,7 +777,7 @@
777777
778#. module: l10n_ve_withholding_islr778#. module: l10n_ve_withholding_islr
779#: model:ir.model,name:l10n_ve_withholding_islr.model_islr_wh_doc779#: model:ir.model,name:l10n_ve_withholding_islr.model_islr_wh_doc
780msgid "Document Withholding Income"780msgid "Document Income Withholding"
781msgstr "Documento de RetenciĂ³n de ISLR"781msgstr "Documento de RetenciĂ³n de ISLR"
782782
783#. module: l10n_ve_withholding_islr783#. module: l10n_ve_withholding_islr
@@ -787,7 +787,7 @@
787787
788#. module: l10n_ve_withholding_islr788#. module: l10n_ve_withholding_islr
789#: help:product.template,concept_id:0789#: help:product.template,concept_id:0
790msgid "Concept Withholding Income to apply to the service"790msgid "Concept Income Withholding to apply to the service"
791msgstr "Concepto de RetenciĂ³n a aplicar para el servicio"791msgstr "Concepto de RetenciĂ³n a aplicar para el servicio"
792792
793#. module: l10n_ve_withholding_islr793#. module: l10n_ve_withholding_islr
@@ -812,7 +812,7 @@
812812
813#. module: l10n_ve_withholding_islr813#. module: l10n_ve_withholding_islr
814#: model:ir.actions.report.xml,name:l10n_ve_withholding_islr.voucher_report_withholding_islr814#: model:ir.actions.report.xml,name:l10n_ve_withholding_islr.voucher_report_withholding_islr
815msgid "Voucher Withholding Income"815msgid "Voucher Income Withholding"
816msgstr "Comprobante de ISLR"816msgstr "Comprobante de ISLR"
817817
818#. module: l10n_ve_withholding_islr818#. module: l10n_ve_withholding_islr
@@ -827,7 +827,7 @@
827827
828#. module: l10n_ve_withholding_islr828#. module: l10n_ve_withholding_islr
829#: view:islr.wh.doc.line:0829#: view:islr.wh.doc.line:0
830msgid "Detail of the Concept of Withholding Income"830msgid "Detail of the Concept of Income Withholding"
831msgstr "Detalle del Concepto de RetenciĂ³n de ISLR"831msgstr "Detalle del Concepto de RetenciĂ³n de ISLR"
832832
833#. module: l10n_ve_withholding_islr833#. module: l10n_ve_withholding_islr
@@ -871,7 +871,7 @@
871#. module: l10n_ve_withholding_islr871#. module: l10n_ve_withholding_islr
872#: code:addons/l10n_ve_withholding_islr/installer.py:93872#: code:addons/l10n_ve_withholding_islr/installer.py:93
873#, python-format873#, python-format
874msgid "Journal Withholding Income Sale"874msgid "Journal Income Withholding Sale"
875msgstr "Diario ISLR para ventas"875msgstr "Diario ISLR para ventas"
876876
877#. module: l10n_ve_withholding_islr877#. module: l10n_ve_withholding_islr
@@ -973,7 +973,7 @@
973973
974#. module: l10n_ve_withholding_islr974#. module: l10n_ve_withholding_islr
975#: field:wh.islr.config,account_sale:0975#: field:wh.islr.config,account_sale:0
976msgid "Account Withholding Income Sale"976msgid "Account Income Withholding Sale"
977msgstr "Cuenta contable ISLR (ventas)"977msgstr "Cuenta contable ISLR (ventas)"
978978
979#. module: l10n_ve_withholding_islr979#. module: l10n_ve_withholding_islr
@@ -1014,7 +1014,7 @@
1014#. module: l10n_ve_withholding_islr1014#. module: l10n_ve_withholding_islr
1015#: code:addons/l10n_ve_withholding_islr/invoice.py:2291015#: code:addons/l10n_ve_withholding_islr/invoice.py:229
1016#, python-format1016#, python-format
1017msgid "Impossible withholding income, because the Concept of Withholding associated with type line is not withheld!"1017msgid "Impossible income withholding, because the Concept of Withholding associated with type line is not withheld!"
1018msgstr "Imposible realizar Comprobante de RetenciĂ³n ISLR, debido a que el Concepto de RetenciĂ³n asociado a la lĂ­nea no es de tipo Retenible!"1018msgstr "Imposible realizar Comprobante de RetenciĂ³n ISLR, debido a que el Concepto de RetenciĂ³n asociado a la lĂ­nea no es de tipo Retenible!"
10191019
1020#. module: l10n_ve_withholding_islr1020#. module: l10n_ve_withholding_islr
@@ -1037,7 +1037,7 @@
1037#. module: l10n_ve_withholding_islr1037#. module: l10n_ve_withholding_islr
1038#: model:ir.model,name:l10n_ve_withholding_islr.model_islr_wh_concept1038#: model:ir.model,name:l10n_ve_withholding_islr.model_islr_wh_concept
1039#: field:islr.wh.doc,concept_ids:01039#: field:islr.wh.doc,concept_ids:0
1040msgid "Withholding Income Concept"1040msgid "Income Withholding Concept"
1041msgstr "Concepto de RetenciĂ³n de ISLR"1041msgstr "Concepto de RetenciĂ³n de ISLR"
10421042
1043#. module: l10n_ve_withholding_islr1043#. module: l10n_ve_withholding_islr
@@ -1052,7 +1052,7 @@
10521052
1053#. module: l10n_ve_withholding_islr1053#. module: l10n_ve_withholding_islr
1054#: help:wh.islr.config,account_purchase:01054#: help:wh.islr.config,account_purchase:0
1055msgid "Account for purchase operations involving Withholding Income"1055msgid "Account for purchase operations involving Income Withholding"
1056msgstr "Cuenta contable para operaciones de compra que involucran ISLR"1056msgstr "Cuenta contable para operaciones de compra que involucran ISLR"
10571057
1058#. module: l10n_ve_withholding_islr1058#. module: l10n_ve_withholding_islr
@@ -1077,8 +1077,8 @@
10771077
1078#. module: l10n_ve_withholding_islr1078#. module: l10n_ve_withholding_islr
1079#: help:islr.xml.wh.doc,name:01079#: help:islr.xml.wh.doc,name:0
1080msgid "Description about statement of withholding income"1080msgid "Description about statement of income withholding"
1081msgstr "Description about statement of withholding income"1081msgstr "Description about statement of income withholding"
10821082
1083#. module: l10n_ve_withholding_islr1083#. module: l10n_ve_withholding_islr
1084#: report:islr.wh.doc:01084#: report:islr.wh.doc:0
@@ -1087,12 +1087,12 @@
10871087
1088#. module: l10n_ve_withholding_islr1088#. module: l10n_ve_withholding_islr
1089#: view:islr.wh.concept:01089#: view:islr.wh.concept:0
1090msgid "Search Concept of Withholding Income"1090msgid "Search Concept of Income Withholding"
1091msgstr "BĂºsqueda - Concepto de RetenciĂ³n de ISLR"1091msgstr "BĂºsqueda - Concepto de RetenciĂ³n de ISLR"
10921092
1093#. module: l10n_ve_withholding_islr1093#. module: l10n_ve_withholding_islr
1094#: field:res.partner,islr_withholding_agent:01094#: field:res.partner,islr_withholding_agent:0
1095msgid "Withholding Income Agent?"1095msgid "Income Withholding Agent?"
1096msgstr "Agente de RetenciĂ³n de ISLR?"1096msgstr "Agente de RetenciĂ³n de ISLR?"
10971097
1098#. module: l10n_ve_withholding_islr1098#. module: l10n_ve_withholding_islr
@@ -1173,7 +1173,7 @@
1173#. module: l10n_ve_withholding_islr1173#. module: l10n_ve_withholding_islr
1174#: code:addons/l10n_ve_withholding_islr/invoice.py:1661174#: code:addons/l10n_ve_withholding_islr/invoice.py:166
1175#, python-format1175#, python-format
1176msgid "Impossible withholding income, because the partner '%s' country has not defined direction in fiscal!"1176msgid "Impossible income withholding, because the partner '%s' country has not defined direction in fiscal!"
1177msgstr "Imposible realizar Comprobante de RetenciĂ³n de ISLR, debido a que el partner '%s' no tiene paĂ­s en su facturaciĂ³n fiscal!"1177msgstr "Imposible realizar Comprobante de RetenciĂ³n de ISLR, debido a que el partner '%s' no tiene paĂ­s en su facturaciĂ³n fiscal!"
11781178
1179#. module: l10n_ve_withholding_islr1179#. module: l10n_ve_withholding_islr
@@ -1251,7 +1251,7 @@
12511251
1252#. module: l10n_ve_withholding_islr1252#. module: l10n_ve_withholding_islr
1253#: help:wh.islr.config,account_sale:01253#: help:wh.islr.config,account_sale:0
1254msgid "Account for sale operations involving Withholding Income"1254msgid "Account for sale operations involving Income Withholding"
1255msgstr "Cuenta para operaciones de ventas que involucran ISLR"1255msgstr "Cuenta para operaciones de ventas que involucran ISLR"
12561256
1257#. module: l10n_ve_withholding_islr1257#. module: l10n_ve_withholding_islr
@@ -1293,7 +1293,7 @@
1293#. module: l10n_ve_withholding_islr1293#. module: l10n_ve_withholding_islr
1294#: code:addons/l10n_ve_withholding_islr/islr_wh_doc.py:4101294#: code:addons/l10n_ve_withholding_islr/islr_wh_doc.py:410
1295#, python-format1295#, python-format
1296msgid "Impossible withholding income, because the supplier '%s' withholding agent is not!"1296msgid "Impossible income withholding, because the supplier '%s' withholding agent is not!"
1297msgstr "Imposible realizar Comprobante de RetenciĂ³n de ISLR, debido a que el comprador '%s' no es agente de RetenciĂ³n!"1297msgstr "Imposible realizar Comprobante de RetenciĂ³n de ISLR, debido a que el comprador '%s' no es agente de RetenciĂ³n!"
12981298
1299#. module: l10n_ve_withholding_islr1299#. module: l10n_ve_withholding_islr
@@ -1304,22 +1304,22 @@
1304#. module: l10n_ve_withholding_islr1304#. module: l10n_ve_withholding_islr
1305#: model:ir.module.module,description:l10n_ve_withholding_islr.module_meta_information1305#: model:ir.module.module,description:l10n_ve_withholding_islr.module_meta_information
1306msgid "\n"1306msgid "\n"
1307" ----------Automatically Calculated Withholding Income------------\n"1307" ----------Automatically Calculated Income Withholding------------\n"
1308"\n"1308"\n"
1309" What make this module?\n"1309" What make this module?\n"
1310" \n"1310" \n"
1311" --Generate the voucher of withholding income to validate the invoice.\n"1311" --Generate the voucher of income withholding to validate the invoice.\n"
1312" --Generate the report of voucher of withholding income.\n"1312" --Generate the report of voucher of income withholding.\n"
1313" --Generate the file .xml required by the Venezuelan laws, for agent\n"1313" --Generate the file .xml required by the Venezuelan laws, for agent\n"
1314" of withholding income specials.\n"1314" of income withholding specials.\n"
1315" --Generate view for load the concepts of wittholding whith their rates.\n"1315" --Generate view for load the concepts of wittholding whith their rates.\n"
1316" --Generate view for visualize the withholding income for suppilers and \n"1316" --Generate view for visualize the income withholding for suppilers and \n"
1317" customers.\n"1317" customers.\n"
1318" --Load data of the 86 concepts of wittholdings whith their rates.\n"1318" --Load data of the 86 concepts of wittholdings whith their rates.\n"
1319"\n"1319"\n"
1320" Impromevents\n"1320" Impromevents\n"
1321" \n"1321" \n"
1322" --For include the functionality of the withholding income to sales, \n"1322" --For include the functionality of the income withholding to sales, \n"
1323" purchases and stock you should installer the module: l10n_ve_sale_purchase.\n"1323" purchases and stock you should installer the module: l10n_ve_sale_purchase.\n"
1324" "1324" "
1325msgstr "\n"1325msgstr "\n"
@@ -1352,7 +1352,7 @@
1352#. module: l10n_ve_withholding_islr1352#. module: l10n_ve_withholding_islr
1353#: code:addons/l10n_ve_withholding_islr/product.py:621353#: code:addons/l10n_ve_withholding_islr/product.py:62
1354#, python-format1354#, python-format
1355msgid "Must create the concept of withholding income"1355msgid "Must create the concept of income withholding"
1356msgstr "Debe crear el concepto de retenciĂ³n de ISLR"1356msgstr "Debe crear el concepto de retenciĂ³n de ISLR"
13571357
1358#. module: l10n_ve_withholding_islr1358#. module: l10n_ve_withholding_islr
@@ -1368,12 +1368,12 @@
1368#: view:islr.xml.wh.line:01368#: view:islr.xml.wh.line:0
1369#: view:product.product:01369#: view:product.product:0
1370#: view:product.template:01370#: view:product.template:0
1371msgid "Concept of Withholding Income"1371msgid "Concept of Income Withholding"
1372msgstr "Concepto de RetenciĂ³n de ISLR"1372msgstr "Concepto de RetenciĂ³n de ISLR"
13731373
1374#. module: l10n_ve_withholding_islr1374#. module: l10n_ve_withholding_islr
1375#: help:wh.islr.config,wh_agent:01375#: help:wh.islr.config,wh_agent:0
1376msgid "Check if this company is a withholding income agent"1376msgid "Check if this company is a income withholding agent"
1377msgstr "Determine si su cumpañía es un agente de retenciĂ³n de ISLR"1377msgstr "Determine si su cumpañía es un agente de retenciĂ³n de ISLR"
13781378
1379#. module: l10n_ve_withholding_islr1379#. module: l10n_ve_withholding_islr
@@ -1384,7 +1384,7 @@
1384#. module: l10n_ve_withholding_islr1384#. module: l10n_ve_withholding_islr
1385#: code:addons/l10n_ve_withholding_islr/invoice.py:2801385#: code:addons/l10n_ve_withholding_islr/invoice.py:280
1386#, python-format1386#, python-format
1387msgid "Impossible withholding income, because the invoice number: '%s' has not control number associated!"1387msgid "Impossible income withholding, because the invoice number: '%s' has not control number associated!"
1388msgstr "Imposible realizar Comprobante de RetenciĂ³n ISLR, debido a que la factura nĂºmero: '%s' no tiene NĂºmero de Control Asociado!"1388msgstr "Imposible realizar Comprobante de RetenciĂ³n ISLR, debido a que la factura nĂºmero: '%s' no tiene NĂºmero de Control Asociado!"
13891389
1390#. module: l10n_ve_withholding_islr1390#. module: l10n_ve_withholding_islr
@@ -1425,12 +1425,12 @@
1425#. module: l10n_ve_withholding_islr1425#. module: l10n_ve_withholding_islr
1426#: code:addons/l10n_ve_withholding_islr/islr_wh_doc.py:4121426#: code:addons/l10n_ve_withholding_islr/islr_wh_doc.py:412
1427#, python-format1427#, python-format
1428msgid "Impossible withholding income, because the lines of the invoice has not concept withholding!"1428msgid "Impossible income withholding, because the lines of the invoice has not concept withholding!"
1429msgstr "Imposible realizar retenciĂ³n de ISLR, porque las lineas de la factura no tienen concepto de retenciĂ³n asociado!"1429msgstr "Imposible realizar retenciĂ³n de ISLR, porque las lineas de la factura no tienen concepto de retenciĂ³n asociado!"
14301430
1431#. module: l10n_ve_withholding_islr1431#. module: l10n_ve_withholding_islr
1432#: view:wh.islr.config:01432#: view:wh.islr.config:0
1433msgid "Withholding income Configuration"1433msgid "Income withholding Configuration"
1434msgstr "ConfiguraciĂ³n de la RetenciĂ³n de ISLR"1434msgstr "ConfiguraciĂ³n de la RetenciĂ³n de ISLR"
14351435
1436#. module: l10n_ve_withholding_islr1436#. module: l10n_ve_withholding_islr
@@ -1441,7 +1441,7 @@
1441#. module: l10n_ve_withholding_islr1441#. module: l10n_ve_withholding_islr
1442#: view:wh.islr.config:01442#: view:wh.islr.config:0
1443msgid "\n"1443msgid "\n"
1444"Configure your company's withholding income \n"1444"Configure your company's income withholding \n"
1445" "1445" "
1446msgstr "\n"1446msgstr "\n"
1447"Configure los datos de su compañía para la RetenciĂ³n del Impuesto Sobre La Renta (ISLR) \n"1447"Configure los datos de su compañía para la RetenciĂ³n del Impuesto Sobre La Renta (ISLR) \n"
14481448
=== modified file 'l10n_ve_withholding_islr/i18n/es_VE.po'
--- l10n_ve_withholding_islr/i18n/es_VE.po 2012-02-09 19:23:11 +0000
+++ l10n_ve_withholding_islr/i18n/es_VE.po 2013-01-14 19:15:27 +0000
@@ -27,7 +27,7 @@
2727
28#. module: l10n_ve_withholding_islr28#. module: l10n_ve_withholding_islr
29#: view:islr.wh.doc:029#: view:islr.wh.doc:0
30msgid "Print Withholding Income"30msgid "Print Income Withholding"
31msgstr "Imprimir comprobante de retenciĂ³n"31msgstr "Imprimir comprobante de retenciĂ³n"
3232
3333
@@ -38,7 +38,7 @@
3838
39#. module: l10n_ve_withholding_islr39#. module: l10n_ve_withholding_islr
40#: field:islr.xml.wh.doc,amount_total_ret:040#: field:islr.xml.wh.doc,amount_total_ret:0
41msgid "Withholding Income Amount Total"41msgid "Income Withholding Amount Total"
42msgstr "Monto Total de RetenciĂ³n de ISLR"42msgstr "Monto Total de RetenciĂ³n de ISLR"
4343
44#. module: l10n_ve_withholding_islr44#. module: l10n_ve_withholding_islr
@@ -54,7 +54,7 @@
54#. module: l10n_ve_withholding_islr54#. module: l10n_ve_withholding_islr
55#: code:addons/l10n_ve_withholding_islr/invoice.py:46155#: code:addons/l10n_ve_withholding_islr/invoice.py:461
56#, python-format56#, python-format
57msgid "Impossible withholding income, because the journal of withholding income for the '%s' has not been created with the type '%s'"57msgid "Impossible income withholding, because the journal of income withholding for the '%s' has not been created with the type '%s'"
58msgstr "Imposible realizar Comprobante de RetenciĂ³n ISLR, debido a que el diario de ISLR para la '%s' no ha sido creado con el tipo '%s'"58msgstr "Imposible realizar Comprobante de RetenciĂ³n ISLR, debido a que el diario de ISLR para la '%s' no ha sido creado con el tipo '%s'"
5959
60#. module: l10n_ve_withholding_islr60#. module: l10n_ve_withholding_islr
@@ -64,7 +64,7 @@
6464
65#. module: l10n_ve_withholding_islr65#. module: l10n_ve_withholding_islr
66#: help:res.partner,islr_withholding_agent:066#: help:res.partner,islr_withholding_agent:0
67msgid "Check if the partner is an agent for withholding income"67msgid "Check if the partner is an agent for income withholding"
68msgstr "Marque en caso de que la empresa sea agente de retenciĂ³n de ISLR"68msgstr "Marque en caso de que la empresa sea agente de retenciĂ³n de ISLR"
6969
70#. module: l10n_ve_withholding_islr70#. module: l10n_ve_withholding_islr
@@ -147,12 +147,12 @@
147#. module: l10n_ve_withholding_islr147#. module: l10n_ve_withholding_islr
148#: code:addons/l10n_ve_withholding_islr/invoice.py:171148#: code:addons/l10n_ve_withholding_islr/invoice.py:171
149#, python-format149#, python-format
150msgid "Impossible withholding income, because the partner '%s' has not fiscal direction set!."150msgid "Impossible income withholding, because the partner '%s' has not fiscal direction set!."
151msgstr "Imposible realizar Comprobante de RetenciĂ³n de ISLR, debido a que el partner '%s' no tiene direcciĂ³n fiscal asociada!."151msgstr "Imposible realizar Comprobante de RetenciĂ³n de ISLR, debido a que el partner '%s' no tiene direcciĂ³n fiscal asociada!."
152152
153#. module: l10n_ve_withholding_islr153#. module: l10n_ve_withholding_islr
154#: view:islr.wh.doc.line:0154#: view:islr.wh.doc.line:0
155msgid "Lines Withholding Income"155msgid "Lines Income Withholding"
156msgstr "LĂ­neas de RetenciĂ³n de ISLR"156msgstr "LĂ­neas de RetenciĂ³n de ISLR"
157157
158#. module: l10n_ve_withholding_islr158#. module: l10n_ve_withholding_islr
@@ -205,7 +205,7 @@
205205
206#. module: l10n_ve_withholding_islr206#. module: l10n_ve_withholding_islr
207#: help:wh.islr.config,journal_sale:0207#: help:wh.islr.config,journal_sale:0
208msgid "Journal for sale operations involving Withholding Income"208msgid "Journal for sale operations involving Income Withholding"
209msgstr "Diario para operaciones de venta que involucran retenciĂ³n de ISLR"209msgstr "Diario para operaciones de venta que involucran retenciĂ³n de ISLR"
210210
211#. module: l10n_ve_withholding_islr211#. module: l10n_ve_withholding_islr
@@ -231,7 +231,7 @@
231231
232#. module: l10n_ve_withholding_islr232#. module: l10n_ve_withholding_islr
233#: help:wh.islr.config,journal_purchase:0233#: help:wh.islr.config,journal_purchase:0
234msgid "Journal for purchase operations involving Withholding Income"234msgid "Journal for purchase operations involving Income Withholding"
235msgstr "Diario para operaciones de venta que involucran ISLR"235msgstr "Diario para operaciones de venta que involucran ISLR"
236236
237#. module: l10n_ve_withholding_islr237#. module: l10n_ve_withholding_islr
@@ -284,7 +284,7 @@
284#: model:ir.actions.act_window,name:l10n_ve_withholding_islr.action_wh_islr_customer284#: model:ir.actions.act_window,name:l10n_ve_withholding_islr.action_wh_islr_customer
285#: model:ir.ui.menu,name:l10n_ve_withholding_islr.menu_action_wh_islr_customer285#: model:ir.ui.menu,name:l10n_ve_withholding_islr.menu_action_wh_islr_customer
286#: view:islr.wh.doc:0286#: view:islr.wh.doc:0
287msgid "Customer Withholding Income"287msgid "Customer Income Withholding"
288msgstr "RetenciĂ³n de ISLR de Cliente"288msgstr "RetenciĂ³n de ISLR de Cliente"
289289
290#. module: l10n_ve_withholding_islr290#. module: l10n_ve_withholding_islr
@@ -299,7 +299,7 @@
299299
300#. module: l10n_ve_withholding_islr300#. module: l10n_ve_withholding_islr
301#: field:wh.islr.config,account_purchase:0301#: field:wh.islr.config,account_purchase:0
302msgid "Account Withholding Income Purchase"302msgid "Account Income Withholding Purchase"
303msgstr "Cuenta contable para ISLR (compras)"303msgstr "Cuenta contable para ISLR (compras)"
304304
305#. module: l10n_ve_withholding_islr305#. module: l10n_ve_withholding_islr
@@ -348,7 +348,7 @@
348#: model:ir.actions.act_window,name:l10n_ve_withholding_islr.action_wh_islr_supplier348#: model:ir.actions.act_window,name:l10n_ve_withholding_islr.action_wh_islr_supplier
349#: model:ir.ui.menu,name:l10n_ve_withholding_islr.menu_action_wh_islr_supplier349#: model:ir.ui.menu,name:l10n_ve_withholding_islr.menu_action_wh_islr_supplier
350#: view:islr.wh.doc:0350#: view:islr.wh.doc:0
351msgid "Supplier Withholding Income"351msgid "Supplier Income Withholding"
352msgstr "RetenciĂ³n de ISLR de Proveedores"352msgstr "RetenciĂ³n de ISLR de Proveedores"
353353
354#. module: l10n_ve_withholding_islr354#. module: l10n_ve_withholding_islr
@@ -374,7 +374,7 @@
374#. module: l10n_ve_withholding_islr374#. module: l10n_ve_withholding_islr
375#: code:addons/l10n_ve_withholding_islr/invoice.py:270375#: code:addons/l10n_ve_withholding_islr/invoice.py:270
376#, python-format376#, python-format
377msgid "Impossible withholding income,because the invoice number: '%s' has not number reference free!"377msgid "Impossible income withholding,because the invoice number: '%s' has not number reference free!"
378msgstr "Imposible realizar Comprobante de RetenciĂ³n ISLR, debido a que la factura nĂºmero: '%s' no tiene NĂºmero de Referencia Libre!"378msgstr "Imposible realizar Comprobante de RetenciĂ³n ISLR, debido a que la factura nĂºmero: '%s' no tiene NĂºmero de Referencia Libre!"
379379
380#. module: l10n_ve_withholding_islr380#. module: l10n_ve_withholding_islr
@@ -426,7 +426,7 @@
426#. module: l10n_ve_withholding_islr426#. module: l10n_ve_withholding_islr
427#: code:addons/l10n_ve_withholding_islr/islr_wh_doc.py:282427#: code:addons/l10n_ve_withholding_islr/islr_wh_doc.py:282
428#, python-format428#, python-format
429msgid "Impossible withholding income, because the account for withholding of sale is not assigned to the Concept withholding '%s'!"429msgid "Impossible income withholding, because the account for withholding of sale is not assigned to the Concept withholding '%s'!"
430msgstr "Imposible realizar RetenciĂ³n ISLR, debido a que la cuenta contable para retenciĂ³n de venta no esta asignada al Concepto '%s' !!"430msgstr "Imposible realizar RetenciĂ³n ISLR, debido a que la cuenta contable para retenciĂ³n de venta no esta asignada al Concepto '%s' !!"
431431
432#. module: l10n_ve_withholding_islr432#. module: l10n_ve_withholding_islr
@@ -442,7 +442,7 @@
442#. module: l10n_ve_withholding_islr442#. module: l10n_ve_withholding_islr
443#: code:addons/l10n_ve_withholding_islr/invoice.py:194443#: code:addons/l10n_ve_withholding_islr/invoice.py:194
444#, python-format444#, python-format
445msgid "Impossible withholding income, because the partner '%s' has not vat associated!"445msgid "Impossible income withholding, because the partner '%s' has not vat associated!"
446msgstr "Imposible realizar Comprobante de Retencion ISLR, debido a que el partner, '%s' no tiene RIF asociado!"446msgstr "Imposible realizar Comprobante de Retencion ISLR, debido a que el partner, '%s' no tiene RIF asociado!"
447447
448#. module: l10n_ve_withholding_islr448#. module: l10n_ve_withholding_islr
@@ -462,7 +462,7 @@
462462
463#. module: l10n_ve_withholding_islr463#. module: l10n_ve_withholding_islr
464#: model:ir.actions.act_window,help:l10n_ve_withholding_islr.action_wh_islr_supplier464#: model:ir.actions.act_window,help:l10n_ve_withholding_islr.action_wh_islr_supplier
465msgid "With Supplier Withholding you can manage document withholding issued to your suppliers. OpenERP can Just generate document withholding for purchase process automatically from invoices. To generate the withholding income and all accounting process you must confirm and validate the document withholding."465msgid "With Supplier Withholding you can manage document withholding issued to your suppliers. OpenERP can Just generate document withholding for purchase process automatically from invoices. To generate the income withholding and all accounting process you must confirm and validate the document withholding."
466msgstr "A travĂ©s de RetenciĂ³n de ISLR de proveedores usted prodrĂ¡ gestionar el documento de retenciĂ³n emitido para sus proveedores. OpenERP tambiĂ©n puede generar el documento de retenciĂ³n automĂ¡ticamente desde la factura de proveedor. Para generar la retenciĂ³n se debe confirmar y validar el documento de retenciĂ³n."466msgstr "A travĂ©s de RetenciĂ³n de ISLR de proveedores usted prodrĂ¡ gestionar el documento de retenciĂ³n emitido para sus proveedores. OpenERP tambiĂ©n puede generar el documento de retenciĂ³n automĂ¡ticamente desde la factura de proveedor. Para generar la retenciĂ³n se debe confirmar y validar el documento de retenciĂ³n."
467467
468#. module: l10n_ve_withholding_islr468#. module: l10n_ve_withholding_islr
@@ -538,13 +538,13 @@
538538
539#. module: l10n_ve_withholding_islr539#. module: l10n_ve_withholding_islr
540#: field:islr.xml.wh.line,islr_wh_doc_line_id:0540#: field:islr.xml.wh.line,islr_wh_doc_line_id:0
541msgid "Withholding Income Document"541msgid "Income Withholding Document"
542msgstr "Documento de RetenciĂ³n de ISLR"542msgstr "Documento de RetenciĂ³n de ISLR"
543543
544#. module: l10n_ve_withholding_islr544#. module: l10n_ve_withholding_islr
545#: code:addons/l10n_ve_withholding_islr/islr_wh_doc.py:288545#: code:addons/l10n_ve_withholding_islr/islr_wh_doc.py:288
546#, python-format546#, python-format
547msgid "Impossible withholding income, because the account for withholding of purchase is not assigned to the Concept withholding '%s'!"547msgid "Impossible income withholding, because the account for withholding of purchase is not assigned to the Concept withholding '%s'!"
548msgstr "Imposible realizar RetenciĂ³n ISLR, debido a que la cuenta contable para retenciĂ³n de compra no esta asignada al Concepto '%s' !"548msgstr "Imposible realizar RetenciĂ³n ISLR, debido a que la cuenta contable para retenciĂ³n de compra no esta asignada al Concepto '%s' !"
549549
550#. module: l10n_ve_withholding_islr550#. module: l10n_ve_withholding_islr
@@ -630,7 +630,7 @@
630630
631#. module: l10n_ve_withholding_islr631#. module: l10n_ve_withholding_islr
632#: help:account.invoice.line,concept_id:0632#: help:account.invoice.line,concept_id:0
633msgid "Concept of Withholding Income asociate this rate"633msgid "Concept of Income Withholding asociate this rate"
634msgstr "Concepto de RetenciĂ³n asociado a esta tasa"634msgstr "Concepto de RetenciĂ³n asociado a esta tasa"
635635
636#. module: l10n_ve_withholding_islr636#. module: l10n_ve_withholding_islr
@@ -650,7 +650,7 @@
650650
651#. module: l10n_ve_withholding_islr651#. module: l10n_ve_withholding_islr
652#: view:islr.wh.doc:0652#: view:islr.wh.doc:0
653msgid "Search Withholding Income"653msgid "Search Income Withholding"
654msgstr "BĂºsqueda - Documento de ISLR"654msgstr "BĂºsqueda - Documento de ISLR"
655655
656#. module: l10n_ve_withholding_islr656#. module: l10n_ve_withholding_islr
@@ -666,7 +666,7 @@
666#. module: l10n_ve_withholding_islr666#. module: l10n_ve_withholding_islr
667#: code:addons/l10n_ve_withholding_islr/installer.py:92667#: code:addons/l10n_ve_withholding_islr/installer.py:92
668#, python-format668#, python-format
669msgid "Journal Withholding Income Purchase"669msgid "Journal Income Withholding Purchase"
670msgstr "Diario ISLR para compras"670msgstr "Diario ISLR para compras"
671671
672#. module: l10n_ve_withholding_islr672#. module: l10n_ve_withholding_islr
@@ -681,12 +681,12 @@
681681
682#. module: l10n_ve_withholding_islr682#. module: l10n_ve_withholding_islr
683#: field:wh.islr.config,wh_agent:0683#: field:wh.islr.config,wh_agent:0
684msgid "Withholding Income Agent"684msgid "Income Withholding Agent"
685msgstr "Eres agente de retenciĂ³n de ISLR?"685msgstr "Eres agente de retenciĂ³n de ISLR?"
686686
687#. module: l10n_ve_withholding_islr687#. module: l10n_ve_withholding_islr
688#: model:ir.module.module,shortdesc:l10n_ve_withholding_islr.module_meta_information688#: model:ir.module.module,shortdesc:l10n_ve_withholding_islr.module_meta_information
689msgid "Automatically Calculation Withholding Income"689msgid "Automatically Calculation Income Withholding"
690msgstr "Calculo AutomĂ¡tico de Impuesto Sobre la Renta (ISLR)"690msgstr "Calculo AutomĂ¡tico de Impuesto Sobre la Renta (ISLR)"
691691
692#. module: l10n_ve_withholding_islr692#. module: l10n_ve_withholding_islr
@@ -702,7 +702,7 @@
702702
703#. module: l10n_ve_withholding_islr703#. module: l10n_ve_withholding_islr
704#: model:ir.actions.act_window,help:l10n_ve_withholding_islr.action_wh_islr_concept704#: model:ir.actions.act_window,help:l10n_ve_withholding_islr.action_wh_islr_concept
705msgid "With \"Concept of Withholding Income\" you can create and manage the concept of wittholding income. For each concept is to create and manage rates associated."705msgid "With \"Concept of Income Withholding\" you can create and manage the concept of wittholding income. For each concept is to create and manage rates associated."
706msgstr "A travĂ©s de \"Concepto de RetenciĂ³n de ISLR\" usted podrĂ¡ crear y gestionar los conceptos de retenciĂ³n de ISLR. Por cada concepto se puede crear y gestionar las tasas asociadas."706msgstr "A travĂ©s de \"Concepto de RetenciĂ³n de ISLR\" usted podrĂ¡ crear y gestionar los conceptos de retenciĂ³n de ISLR. Por cada concepto se puede crear y gestionar las tasas asociadas."
707707
708#. module: l10n_ve_withholding_islr708#. module: l10n_ve_withholding_islr
@@ -713,7 +713,7 @@
713713
714#. module: l10n_ve_withholding_islr714#. module: l10n_ve_withholding_islr
715#: model:ir.model,name:l10n_ve_withholding_islr.model_islr_wh_doc_line715#: model:ir.model,name:l10n_ve_withholding_islr.model_islr_wh_doc_line
716msgid "Lines of Document Withholding Income"716msgid "Lines of Document Income Withholding"
717msgstr "LĂ­neas del Documento de RetenciĂ³n de ISLR"717msgstr "LĂ­neas del Documento de RetenciĂ³n de ISLR"
718718
719#. module: l10n_ve_withholding_islr719#. module: l10n_ve_withholding_islr
@@ -758,7 +758,7 @@
758#. module: l10n_ve_withholding_islr758#. module: l10n_ve_withholding_islr
759#: model:ir.actions.report.xml,name:l10n_ve_withholding_islr.list_report_withholding_islr759#: model:ir.actions.report.xml,name:l10n_ve_withholding_islr.list_report_withholding_islr
760#: model:ir.ui.menu,name:l10n_ve_withholding_islr.menu_wh_configuration_islr760#: model:ir.ui.menu,name:l10n_ve_withholding_islr.menu_wh_configuration_islr
761msgid "Withholding Income"761msgid "Income Withholding"
762msgstr "RetenciĂ³n de ISLR"762msgstr "RetenciĂ³n de ISLR"
763763
764#. module: l10n_ve_withholding_islr764#. module: l10n_ve_withholding_islr
@@ -778,7 +778,7 @@
778778
779#. module: l10n_ve_withholding_islr779#. module: l10n_ve_withholding_islr
780#: model:ir.model,name:l10n_ve_withholding_islr.model_islr_wh_doc780#: model:ir.model,name:l10n_ve_withholding_islr.model_islr_wh_doc
781msgid "Document Withholding Income"781msgid "Document Income Withholding"
782msgstr "Documento de RetenciĂ³n de ISLR"782msgstr "Documento de RetenciĂ³n de ISLR"
783783
784#. module: l10n_ve_withholding_islr784#. module: l10n_ve_withholding_islr
@@ -788,7 +788,7 @@
788788
789#. module: l10n_ve_withholding_islr789#. module: l10n_ve_withholding_islr
790#: help:product.template,concept_id:0790#: help:product.template,concept_id:0
791msgid "Concept Withholding Income to apply to the service"791msgid "Concept Income Withholding to apply to the service"
792msgstr "Concepto de RetenciĂ³n a aplicar para el servicio"792msgstr "Concepto de RetenciĂ³n a aplicar para el servicio"
793793
794#. module: l10n_ve_withholding_islr794#. module: l10n_ve_withholding_islr
@@ -813,7 +813,7 @@
813813
814#. module: l10n_ve_withholding_islr814#. module: l10n_ve_withholding_islr
815#: model:ir.actions.report.xml,name:l10n_ve_withholding_islr.voucher_report_withholding_islr815#: model:ir.actions.report.xml,name:l10n_ve_withholding_islr.voucher_report_withholding_islr
816msgid "Voucher Withholding Income"816msgid "Voucher Income Withholding"
817msgstr "Comprobante de ISLR"817msgstr "Comprobante de ISLR"
818818
819#. module: l10n_ve_withholding_islr819#. module: l10n_ve_withholding_islr
@@ -828,7 +828,7 @@
828828
829#. module: l10n_ve_withholding_islr829#. module: l10n_ve_withholding_islr
830#: view:islr.wh.doc.line:0830#: view:islr.wh.doc.line:0
831msgid "Detail of the Concept of Withholding Income"831msgid "Detail of the Concept of Income Withholding"
832msgstr "Detalle del Concepto de RetenciĂ³n de ISLR"832msgstr "Detalle del Concepto de RetenciĂ³n de ISLR"
833833
834#. module: l10n_ve_withholding_islr834#. module: l10n_ve_withholding_islr
@@ -872,7 +872,7 @@
872#. module: l10n_ve_withholding_islr872#. module: l10n_ve_withholding_islr
873#: code:addons/l10n_ve_withholding_islr/installer.py:93873#: code:addons/l10n_ve_withholding_islr/installer.py:93
874#, python-format874#, python-format
875msgid "Journal Withholding Income Sale"875msgid "Journal Income Withholding Sale"
876msgstr "Diario ISLR para ventas"876msgstr "Diario ISLR para ventas"
877877
878#. module: l10n_ve_withholding_islr878#. module: l10n_ve_withholding_islr
@@ -974,7 +974,7 @@
974974
975#. module: l10n_ve_withholding_islr975#. module: l10n_ve_withholding_islr
976#: field:wh.islr.config,account_sale:0976#: field:wh.islr.config,account_sale:0
977msgid "Account Withholding Income Sale"977msgid "Account Income Withholding Sale"
978msgstr "Cuenta contable ISLR (ventas)"978msgstr "Cuenta contable ISLR (ventas)"
979979
980#. module: l10n_ve_withholding_islr980#. module: l10n_ve_withholding_islr
@@ -1015,7 +1015,7 @@
1015#. module: l10n_ve_withholding_islr1015#. module: l10n_ve_withholding_islr
1016#: code:addons/l10n_ve_withholding_islr/invoice.py:2291016#: code:addons/l10n_ve_withholding_islr/invoice.py:229
1017#, python-format1017#, python-format
1018msgid "Impossible withholding income, because the Concept of Withholding associated with type line is not withheld!"1018msgid "Impossible income withholding, because the Concept of Withholding associated with type line is not withheld!"
1019msgstr "Imposible realizar Comprobante de RetenciĂ³n ISLR, debido a que el Concepto de RetenciĂ³n asociado a la lĂ­nea no es de tipo Retenible!"1019msgstr "Imposible realizar Comprobante de RetenciĂ³n ISLR, debido a que el Concepto de RetenciĂ³n asociado a la lĂ­nea no es de tipo Retenible!"
10201020
1021#. module: l10n_ve_withholding_islr1021#. module: l10n_ve_withholding_islr
@@ -1038,7 +1038,7 @@
1038#. module: l10n_ve_withholding_islr1038#. module: l10n_ve_withholding_islr
1039#: model:ir.model,name:l10n_ve_withholding_islr.model_islr_wh_concept1039#: model:ir.model,name:l10n_ve_withholding_islr.model_islr_wh_concept
1040#: field:islr.wh.doc,concept_ids:01040#: field:islr.wh.doc,concept_ids:0
1041msgid "Withholding Income Concept"1041msgid "Income Withholding Concept"
1042msgstr "Concepto de RetenciĂ³n de ISLR"1042msgstr "Concepto de RetenciĂ³n de ISLR"
10431043
1044#. module: l10n_ve_withholding_islr1044#. module: l10n_ve_withholding_islr
@@ -1053,7 +1053,7 @@
10531053
1054#. module: l10n_ve_withholding_islr1054#. module: l10n_ve_withholding_islr
1055#: help:wh.islr.config,account_purchase:01055#: help:wh.islr.config,account_purchase:0
1056msgid "Account for purchase operations involving Withholding Income"1056msgid "Account for purchase operations involving Income Withholding"
1057msgstr "Cuenta contable para operaciones de compra que involucran ISLR"1057msgstr "Cuenta contable para operaciones de compra que involucran ISLR"
10581058
1059#. module: l10n_ve_withholding_islr1059#. module: l10n_ve_withholding_islr
@@ -1078,8 +1078,8 @@
10781078
1079#. module: l10n_ve_withholding_islr1079#. module: l10n_ve_withholding_islr
1080#: help:islr.xml.wh.doc,name:01080#: help:islr.xml.wh.doc,name:0
1081msgid "Description about statement of withholding income"1081msgid "Description about statement of income withholding"
1082msgstr "Description about statement of withholding income"1082msgstr "Description about statement of income withholding"
10831083
1084#. module: l10n_ve_withholding_islr1084#. module: l10n_ve_withholding_islr
1085#: report:islr.wh.doc:01085#: report:islr.wh.doc:0
@@ -1088,12 +1088,12 @@
10881088
1089#. module: l10n_ve_withholding_islr1089#. module: l10n_ve_withholding_islr
1090#: view:islr.wh.concept:01090#: view:islr.wh.concept:0
1091msgid "Search Concept of Withholding Income"1091msgid "Search Concept of Income Withholding"
1092msgstr "BĂºsqueda - Concepto de RetenciĂ³n de ISLR"1092msgstr "BĂºsqueda - Concepto de RetenciĂ³n de ISLR"
10931093
1094#. module: l10n_ve_withholding_islr1094#. module: l10n_ve_withholding_islr
1095#: field:res.partner,islr_withholding_agent:01095#: field:res.partner,islr_withholding_agent:0
1096msgid "Withholding Income Agent?"1096msgid "Income Withholding Agent?"
1097msgstr "Agente de RetenciĂ³n de ISLR?"1097msgstr "Agente de RetenciĂ³n de ISLR?"
10981098
1099#. module: l10n_ve_withholding_islr1099#. module: l10n_ve_withholding_islr
@@ -1174,7 +1174,7 @@
1174#. module: l10n_ve_withholding_islr1174#. module: l10n_ve_withholding_islr
1175#: code:addons/l10n_ve_withholding_islr/invoice.py:1661175#: code:addons/l10n_ve_withholding_islr/invoice.py:166
1176#, python-format1176#, python-format
1177msgid "Impossible withholding income, because the partner '%s' country has not defined direction in fiscal!"1177msgid "Impossible income withholding, because the partner '%s' country has not defined direction in fiscal!"
1178msgstr "Imposible realizar Comprobante de RetenciĂ³n de ISLR, debido a que el partner '%s' no tiene paĂ­s en su facturaciĂ³n fiscal!"1178msgstr "Imposible realizar Comprobante de RetenciĂ³n de ISLR, debido a que el partner '%s' no tiene paĂ­s en su facturaciĂ³n fiscal!"
11791179
1180#. module: l10n_ve_withholding_islr1180#. module: l10n_ve_withholding_islr
@@ -1252,7 +1252,7 @@
12521252
1253#. module: l10n_ve_withholding_islr1253#. module: l10n_ve_withholding_islr
1254#: help:wh.islr.config,account_sale:01254#: help:wh.islr.config,account_sale:0
1255msgid "Account for sale operations involving Withholding Income"1255msgid "Account for sale operations involving Income Withholding"
1256msgstr "Cuenta para operaciones de ventas que involucran ISLR"1256msgstr "Cuenta para operaciones de ventas que involucran ISLR"
12571257
1258#. module: l10n_ve_withholding_islr1258#. module: l10n_ve_withholding_islr
@@ -1294,7 +1294,7 @@
1294#. module: l10n_ve_withholding_islr1294#. module: l10n_ve_withholding_islr
1295#: code:addons/l10n_ve_withholding_islr/islr_wh_doc.py:4101295#: code:addons/l10n_ve_withholding_islr/islr_wh_doc.py:410
1296#, python-format1296#, python-format
1297msgid "Impossible withholding income, because the supplier '%s' withholding agent is not!"1297msgid "Impossible income withholding, because the supplier '%s' withholding agent is not!"
1298msgstr "Imposible realizar Comprobante de RetenciĂ³n de ISLR, debido a que el comprador '%s' no es agente de RetenciĂ³n!"1298msgstr "Imposible realizar Comprobante de RetenciĂ³n de ISLR, debido a que el comprador '%s' no es agente de RetenciĂ³n!"
12991299
1300#. module: l10n_ve_withholding_islr1300#. module: l10n_ve_withholding_islr
@@ -1305,22 +1305,22 @@
1305#. module: l10n_ve_withholding_islr1305#. module: l10n_ve_withholding_islr
1306#: model:ir.module.module,description:l10n_ve_withholding_islr.module_meta_information1306#: model:ir.module.module,description:l10n_ve_withholding_islr.module_meta_information
1307msgid "\n"1307msgid "\n"
1308" ----------Automatically Calculated Withholding Income------------\n"1308" ----------Automatically Calculated Income Withholding------------\n"
1309"\n"1309"\n"
1310" What make this module?\n"1310" What make this module?\n"
1311" \n"1311" \n"
1312" --Generate the voucher of withholding income to validate the invoice.\n"1312" --Generate the voucher of income withholding to validate the invoice.\n"
1313" --Generate the report of voucher of withholding income.\n"1313" --Generate the report of voucher of income withholding.\n"
1314" --Generate the file .xml required by the Venezuelan laws, for agent\n"1314" --Generate the file .xml required by the Venezuelan laws, for agent\n"
1315" of withholding income specials.\n"1315" of income withholding specials.\n"
1316" --Generate view for load the concepts of wittholding whith their rates.\n"1316" --Generate view for load the concepts of wittholding whith their rates.\n"
1317" --Generate view for visualize the withholding income for suppilers and \n"1317" --Generate view for visualize the income withholding for suppilers and \n"
1318" customers.\n"1318" customers.\n"
1319" --Load data of the 86 concepts of wittholdings whith their rates.\n"1319" --Load data of the 86 concepts of wittholdings whith their rates.\n"
1320"\n"1320"\n"
1321" Impromevents\n"1321" Impromevents\n"
1322" \n"1322" \n"
1323" --For include the functionality of the withholding income to sales, \n"1323" --For include the functionality of the income withholding to sales, \n"
1324" purchases and stock you should installer the module: l10n_ve_sale_purchase.\n"1324" purchases and stock you should installer the module: l10n_ve_sale_purchase.\n"
1325" "1325" "
1326msgstr "\n"1326msgstr "\n"
@@ -1353,7 +1353,7 @@
1353#. module: l10n_ve_withholding_islr1353#. module: l10n_ve_withholding_islr
1354#: code:addons/l10n_ve_withholding_islr/product.py:621354#: code:addons/l10n_ve_withholding_islr/product.py:62
1355#, python-format1355#, python-format
1356msgid "Must create the concept of withholding income"1356msgid "Must create the concept of income withholding"
1357msgstr "Debe crear el concepto de retenciĂ³n de ISLR"1357msgstr "Debe crear el concepto de retenciĂ³n de ISLR"
13581358
1359#. module: l10n_ve_withholding_islr1359#. module: l10n_ve_withholding_islr
@@ -1369,12 +1369,12 @@
1369#: view:islr.xml.wh.line:01369#: view:islr.xml.wh.line:0
1370#: view:product.product:01370#: view:product.product:0
1371#: view:product.template:01371#: view:product.template:0
1372msgid "Concept of Withholding Income"1372msgid "Concept of Income Withholding"
1373msgstr "Concepto de RetenciĂ³n de ISLR"1373msgstr "Concepto de RetenciĂ³n de ISLR"
13741374
1375#. module: l10n_ve_withholding_islr1375#. module: l10n_ve_withholding_islr
1376#: help:wh.islr.config,wh_agent:01376#: help:wh.islr.config,wh_agent:0
1377msgid "Check if this company is a withholding income agent"1377msgid "Check if this company is a income withholding agent"
1378msgstr "Determine si su cumpañía es un agente de retenciĂ³n de ISLR"1378msgstr "Determine si su cumpañía es un agente de retenciĂ³n de ISLR"
13791379
1380#. module: l10n_ve_withholding_islr1380#. module: l10n_ve_withholding_islr
@@ -1385,7 +1385,7 @@
1385#. module: l10n_ve_withholding_islr1385#. module: l10n_ve_withholding_islr
1386#: code:addons/l10n_ve_withholding_islr/invoice.py:2801386#: code:addons/l10n_ve_withholding_islr/invoice.py:280
1387#, python-format1387#, python-format
1388msgid "Impossible withholding income, because the invoice number: '%s' has not control number associated!"1388msgid "Impossible income withholding, because the invoice number: '%s' has not control number associated!"
1389msgstr "Imposible realizar Comprobante de RetenciĂ³n ISLR, debido a que la factura nĂºmero: '%s' no tiene NĂºmero de Control Asociado!"1389msgstr "Imposible realizar Comprobante de RetenciĂ³n ISLR, debido a que la factura nĂºmero: '%s' no tiene NĂºmero de Control Asociado!"
13901390
1391#. module: l10n_ve_withholding_islr1391#. module: l10n_ve_withholding_islr
@@ -1426,12 +1426,12 @@
1426#. module: l10n_ve_withholding_islr1426#. module: l10n_ve_withholding_islr
1427#: code:addons/l10n_ve_withholding_islr/islr_wh_doc.py:4121427#: code:addons/l10n_ve_withholding_islr/islr_wh_doc.py:412
1428#, python-format1428#, python-format
1429msgid "Impossible withholding income, because the lines of the invoice has not concept withholding!"1429msgid "Impossible income withholding, because the lines of the invoice has not concept withholding!"
1430msgstr "Imposible realizar retenciĂ³n de ISLR, porque las lineas de la factura no tienen concepto de retenciĂ³n asociado!"1430msgstr "Imposible realizar retenciĂ³n de ISLR, porque las lineas de la factura no tienen concepto de retenciĂ³n asociado!"
14311431
1432#. module: l10n_ve_withholding_islr1432#. module: l10n_ve_withholding_islr
1433#: view:wh.islr.config:01433#: view:wh.islr.config:0
1434msgid "Withholding income Configuration"1434msgid "Income withholding Configuration"
1435msgstr "ConfiguraciĂ³n de la RetenciĂ³n de ISLR"1435msgstr "ConfiguraciĂ³n de la RetenciĂ³n de ISLR"
14361436
1437#. module: l10n_ve_withholding_islr1437#. module: l10n_ve_withholding_islr
@@ -1442,7 +1442,7 @@
1442#. module: l10n_ve_withholding_islr1442#. module: l10n_ve_withholding_islr
1443#: view:wh.islr.config:01443#: view:wh.islr.config:0
1444msgid "\n"1444msgid "\n"
1445"Configure your company's withholding income \n"1445"Configure your company's income withholding \n"
1446" "1446" "
1447msgstr "\n"1447msgstr "\n"
1448"Configure los datos de su compañía para la RetenciĂ³n del Impuesto Sobre La Renta (ISLR) \n"1448"Configure los datos de su compañía para la RetenciĂ³n del Impuesto Sobre La Renta (ISLR) \n"
14491449
=== modified file 'l10n_ve_withholding_islr/model/installer.py'
--- l10n_ve_withholding_islr/model/installer.py 2012-12-09 23:55:45 +0000
+++ l10n_ve_withholding_islr/model/installer.py 2013-01-14 19:15:27 +0000
@@ -74,24 +74,24 @@
74 self._set_wh_agent(cr, uid)74 self._set_wh_agent(cr, uid)
7575
76 _columns = {76 _columns = {
77 'journal_purchase': fields.char("Journal Wh Income Purchase", 64, help="Journal for purchase operations involving Withholding Income"),77 'journal_purchase': fields.char("Journal Wh Income Purchase", 64, help="Journal for purchase operations involving Income Withholding"),
78 'journal_sale': fields.char("Journal Wh Income Sale", 64, help="Journal for sale operations involving Withholding Income"),78 'journal_sale': fields.char("Journal Wh Income Sale", 64, help="Journal for sale operations involving Income Withholding"),
79 'account_purchase': fields.many2one(79 'account_purchase': fields.many2one(
80 "account.account",80 "account.account",
81 "Account Withholding Income Purchase",81 "Account Income Withholding Purchase",
82 help="Account for purchase operations involving Withholding Income"82 help="Account for purchase operations involving Income Withholding"
83 ),83 ),
84 'account_sale': fields.many2one(84 'account_sale': fields.many2one(
85 "account.account",85 "account.account",
86 "Account Withholding Income Sale",86 "Account Income Withholding Sale",
87 help="Account for sale operations involving Withholding Income",87 help="Account for sale operations involving Income Withholding",
88 ),88 ),
89 'wh_agent': fields.boolean("Withholding Income Agent", help="Check if this company is a withholding income agent"),89 'wh_agent': fields.boolean("Income Withholding Agent", help="Check if this company is a income withholding agent"),
90 }90 }
9191
92 _defaults = {92 _defaults = {
93 'journal_purchase': _("Journal Withholding Income Purchase"),93 'journal_purchase': _("Journal Income Withholding Purchase"),
94 'journal_sale': _("Journal Withholding Income Sale"),94 'journal_sale': _("Journal Income Withholding Sale"),
95 }95 }
9696
97wh_islr_config()97wh_islr_config()
9898
=== modified file 'l10n_ve_withholding_islr/model/invoice.py'
--- l10n_ve_withholding_islr/model/invoice.py 2012-12-09 23:55:45 +0000
+++ l10n_ve_withholding_islr/model/invoice.py 2013-01-14 19:15:27 +0000
@@ -39,7 +39,7 @@
39 _inherit = "account.invoice.line"39 _inherit = "account.invoice.line"
40 _columns = {40 _columns = {
41 'apply_wh': fields.boolean('Withheld',help="Indicates whether a line has been retained or not, to accumulate the amount to withhold next month, according to the lines that have not been retained."),41 'apply_wh': fields.boolean('Withheld',help="Indicates whether a line has been retained or not, to accumulate the amount to withhold next month, according to the lines that have not been retained."),
42 'concept_id': fields.many2one('islr.wh.concept','Withholding Concept',help="Concept of Withholding Income asociate this rate",required=False),42 'concept_id': fields.many2one('islr.wh.concept','Withholding Concept',help="Concept of Income Withholding asociate this rate",required=False),
43 }43 }
44 _defaults = {44 _defaults = {
45 'apply_wh': lambda *a: False,45 'apply_wh': lambda *a: False,
@@ -93,6 +93,76 @@
93 _defaults = {93 _defaults = {
94 'status': lambda *a: "no_pro",94 'status': lambda *a: "no_pro",
95 }95 }
96## BEGIN OF REWRITING ISLR
97
98 def check_invoice_type(self, cr, uid, ids, context=None):
99 '''
100 This method check if the given invoice record is from a supplier
101 '''
102 context = context or {}
103 ids = isinstance(ids, (int, long)) and [ids] or ids
104 inv_brw = self.browse(cr, uid, ids[0],context=context)
105 return inv_brw.type in ('in_invoice', 'in_refund')
106
107 def check_withholdable_concept(self, cr, uid, ids, context=None):
108 '''
109 Check if the given invoice record is ISLR Withholdable
110 '''
111 context = context or {}
112 ids = isinstance(ids, (int, long)) and [ids] or ids
113 iwdi_obj = self.pool.get('islr.wh.doc.invoices')
114 return iwdi_obj._get_concepts(cr, uid, ids, context=context)
115
116 def _create_doc_invoices(self,cr,uid,ids,islr_wh_doc_id,context=None):
117 '''
118 This method link the invoices to be withheld
119 with the withholding document.
120 '''
121 #TODO: CHECK IF THIS METHOD SHOULD BE HERE OR IN THE ISLR WH DOC
122 context = context or {}
123 ids = isinstance(ids, (int, long)) and [ids] or ids
124 doc_inv_obj = self.pool.get('islr.wh.doc.invoices')
125 iwhdi_ids=[]
126 for inv_id in ids:
127 iwhdi_ids.append(doc_inv_obj.create(cr,uid,
128 {'invoice_id':inv_id,'islr_wh_doc_id':islr_wh_doc_id}))
129 return iwhdi_ids
130
131 def _create_islr_wh_doc(self,cr,uid,ids,context=None):
132 '''
133 Funcion para crear en el modelo islr_wh_doc
134 '''
135 context = context or {}
136 ids = isinstance(ids, (int, long)) and [ids] or ids
137
138 doc_line_obj = self.pool.get('islr.wh.doc.line')
139 wh_doc_obj = self.pool.get('islr.wh.doc')
140 inv_obj =self.pool.get('account.invoice.line')
141 rate_obj = self.pool.get('islr.rates')
142
143 row = self.browse(cr,uid,ids[0],context=context)
144 context['type']=row.type
145 wh_ret_code = wh_doc_obj.retencion_seq_get(cr, uid)
146
147 if wh_ret_code:
148 islr_wh_doc_id = wh_doc_obj.create(cr,uid,
149 {'name': wh_ret_code,
150 'partner_id': row.partner_id.id,
151 'invoice_id': row.id,
152 'period_id': row.period_id.id,
153 'account_id': row.account_id.id,
154 'type': row.type,
155 'journal_id': wh_doc_obj._get_journal(cr,uid,context=context),})
156 self._create_doc_invoices(cr,uid,row.id,islr_wh_doc_id)
157 else:
158 raise osv.except_osv(_('Invalid action !'),_("No se ha encontrado el numero de secuencia!"))
159
160 self.write(cr,uid,ids,{'islr_wh_doc_id':islr_wh_doc_id,'islr_wh_doc_name':wh_ret_code})
161
162 #wf_service = netsvc.LocalService("workflow")
163 #wf_service.trg_validate(uid, 'islr.wh.doc', islr_wh_doc_id, 'button_confirm', cr)
164 return islr_wh_doc_id
165## END OF REWRITING ISLR
96166
97 def copy(self, cr, uid, id, default=None, context=None):167 def copy(self, cr, uid, id, default=None, context=None):
98 168
@@ -125,572 +195,6 @@
125 list.append((x,y,res))195 list.append((x,y,res))
126 return list196 return list
127197
128 def _get_partners(self, cr, uid, invoice):
129 '''
130 Get the seller id, the buyer id from the invoice, and the boolean field that determines whether the buyer is the withholding agent
131 '''
132 if invoice.type == 'in_invoice' or invoice.type == 'in_refund':
133 vendor = invoice.partner_id
134 buyer = invoice.company_id.partner_id
135 else:
136 buyer = invoice.partner_id
137 vendor = invoice.company_id.partner_id
138 return (vendor, buyer, buyer.islr_withholding_agent)
139
140 def _get_concepts(self, cr, uid, invoice):
141 '''
142 Gets a list of concepts (cocenpt_id) from the invoice lines
143 '''
144 service_list = []
145 for invoice_line in invoice.invoice_line:
146 if invoice_line.concept_id and invoice_line.concept_id.withholdable:
147 service_list.append(invoice_line.concept_id.id)
148 else:
149 pass
150 return list(set(service_list))
151
152 def _get_service_wh(self, cr, uid, invoice, concept_list):
153 '''
154 Gets all the vendor invoice lines, filtering by the period of the current invoice and the invoice state equal to {done, onpen}
155 The lines are stored in a dictionary, where the first key is the list of lines obtained, the second key is the field that indicates wheter any of these line was withholding, and the third key is the sum of the base of all the lines that have not withholding applied
156 A search in the lines is done seeking for lines that have withholding concepts equals to the current invoice. This is done to verify:
157 1.- If exist the same concepts in another invoice line that have not been withholding cause the amount have no exceeded the minimum value therefore this amount its taken to perform the sum and verification. If the amount exceeds the minimun then withholding is applied to the associated invoices.
158 2.- Verify if is the first time that a withholding is applied on that concept, If is true then the subtrahend is applied in the second key "wf" of the dictionary
159
160 '''
161 dict={}
162 for key in concept_list:
163 dict[key]={'lines':[],'wh':False,'base':0.0}
164 #~ inv_obj = self.pool.get('account.invoice')
165 #~ inv_lst = inv_obj.search(cr, uid,[('partner_id', '=', invoice.partner_id.id),('period_id','=',invoice.period_id.id),('state','in',['done','open'])]) # Lista de facturas asociadas al proveedor actual, al periodo actual y al estado de las facturas: donde, open.
166 #~
167 #~ inv_line_lst=[]
168 #~ for id in inv_lst:
169 #~ inv_line_brw = inv_obj.browse(cr, uid, id).invoice_line #lista de lineas de facturas
170 for line in invoice.invoice_line:
171 if line.concept_id and line.concept_id.id in concept_list: # Se verifica si el concepto de la linea en la que estoy buscando coincide con alguno de los conceptos de la factura actual.
172 if not line.apply_wh: # Se verifica si a la linea no se le ha aplicado retencion, de ser asi se almacena el id de la linea y la base.
173 dict[line.concept_id.id]['lines'].append(line.id)
174 dict[line.concept_id.id]['base']+= line.price_subtotal
175 else: # Si ya se le aplico retencion, no se guarda el id porque no hace falta pero se indica que ya se le aplico retencion.
176 dict[line.concept_id.id]['wh']=True
177 #~ dict[key]={'lines':[],'wh':False,'base':0.0}
178 return dict
179
180 def _get_country_fiscal(self,cr, uid, partner_id):
181 '''
182 Gets depending on the parameters the country of the seller or buyer from the fiscal address.
183 '''
184 for i in partner_id.address:
185 if i.type == 'invoice':
186 if not i.country_id:
187 raise osv.except_osv(_('Invalid action !'),_("Impossible withholding income, because the partner '%s' country has not defined direction in fiscal!") % (partner_id.name))
188 return False
189 else:
190 return i.country_id.id
191 raise osv.except_osv(_('Invalid action !'),_("Impossible withholding income, because the partner '%s' has not fiscal direction set!.") % (partner_id.name))
192 return False
193
194 def _get_residence(self, cr, uid, vendor, buyer):
195 '''
196 Determines whether the buyer fiscal address is the same that the seller. with the objective of later get the associated rate.
197 Return True if is a domiciled or resident person, False if is not
198 '''
199 vendor_address = self._get_country_fiscal(cr, uid, vendor)
200 buyer_address = self._get_country_fiscal(cr, uid, buyer)
201 if vendor_address and buyer_address:
202 if vendor_address == buyer_address:
203 return True
204 else:
205 return False
206 return False
207
208 def _get_nature(self, cr, uid, partner_id):
209 '''
210 Gets the nature of the seller from RIF. Return True if is a natural person type, False if is a legal entity.
211 '''
212 if not partner_id.vat:
213 raise osv.except_osv(_('Invalid action !'),_("Impossible withholding income, because the partner '%s' has not vat associated!") % (partner_id.name))
214 return False
215 else:
216 if partner_id.vat[2:3] in 'VvEe':
217 return True
218 else:
219 return False
220
221 def _get_rate(self, cr, uid, concept_id, residence, nature,context):
222 '''
223 Gets the withholding concept rate, provided if is associated to the below specifications:
224 - the nature of the seller match with a rate
225 - the residence of the seller match with a rate
226 '''
227 ut_obj = self.pool.get('l10n.ut')
228 rate_brw_lst = self.pool.get('islr.wh.concept').browse(cr, uid, concept_id).rate_ids
229 for rate_brw in rate_brw_lst:
230 if rate_brw.nature == nature and rate_brw.residence == residence:
231 #~ (base,min,porc,sust,codigo,id_rate,name_rate)
232 rate_brw_minimum = ut_obj.compute_ut_to_money(cr, uid, rate_brw.minimum, False, context)#metodo que transforma los UVT en pesos
233 rate_brw_subtract = ut_obj.compute_ut_to_money(cr, uid, rate_brw.subtract, False, context)#metodo que transforma los UVT en pesos
234 return (rate_brw.base, rate_brw_minimum, rate_brw.wh_perc, rate_brw_subtract,rate_brw.code,rate_brw.id,rate_brw.name)
235 return ()
236
237 def _get_rate_dict(self, cr, uid, concept_list, residence, nature,context):
238 '''
239 Returns a dictionary with the rate of each withholding concept.
240 '''
241 dictd = {}
242 cont = 0
243 for concept_id in concept_list:
244 dictd[concept_id] = self._get_rate(cr, uid, concept_id, residence, nature,context)
245 if dictd[concept_id]:
246 cont += 1
247 if not cont:
248 raise osv.except_osv(_('Invalid action !'),_("Impossible withholding income, because the Concept of Withholding associated with the line has not rate for the type of customer!"))
249 return dictd
250
251
252 def _pop_dict(self,cr,uid,concept_list,dict_rate,wh_dict):
253 '''
254 Method to delete all the elements where the withholding concept does not have a rate associated, in the dictionary of concept with rates and in the dictionary of invoice lines.
255 '''
256 for concept in concept_list:
257 if not dict_rate[concept]:
258 dict_rate.pop(concept)
259 wh_dict.pop(concept)
260
261 def _get_wh_calc(self,cr,uid,line,dict_rate_concept):
262 base = self.pool.get('account.invoice.line').browse(cr,uid,line).price_subtotal
263 return (base * (dict_rate_concept[0]/100) * (dict_rate_concept[2]/100), base)
264
265 def _get_number(self,cr,uid,number,long):
266 num1 = number[::-1]
267 result= ''
268 for i in num1:
269 if i.isdigit():
270 if len(result)<long:
271 result = i + result
272 else:
273 break
274 else:
275 break
276 return result.strip()
277
278
279 def _get_inv_data(self,cr, uid, line):
280 '''
281 Gets the RIF of the supplier, the invoice number and the control number of the invoice. Data required for XML, among others.
282 '''
283 inv_brw = self.pool.get('account.invoice.line').browse(cr, uid, line).invoice_id
284 vat = inv_brw.partner_id.vat[2:]
285 if inv_brw.type == 'in_invoice' or inv_brw.type == 'in_refund':
286 #~ number = inv_brw.reference.strip()
287 if not inv_brw.reference:
288 raise osv.except_osv(_('Invalid action !'),_("Impossible withholding income,because the invoice number: '%s' has not number reference free!") % (inv_brw.number))
289 number = 0
290 else:
291 number = self._get_number(cr,uid,inv_brw.reference.strip(),10)
292 else:
293 if not inv_brw.number:
294 number = 0
295 else:
296 number = self._get_number(cr,uid,inv_brw.number.strip(),10)
297 if not inv_brw.nro_ctrl:
298 raise osv.except_osv(_('Invalid action !'),_("Impossible withholding income, because the invoice number: '%s' has not control number associated!") % (inv_brw.number))
299 else:
300 control = self._get_number(cr,uid,inv_brw.nro_ctrl.strip(),8)
301
302 return (vat, number, control)
303
304 def _write_wh_apply(self,cr, uid,line,dict,apply,type):
305 '''
306 If wh_xml_id field in the invoice line has an associated xml id:
307 Write over the boolean field in the invoice line True o False depending on whether it holds withholding or not.
308 Write over the xml line the value of the withholding. This happens because it could be created the xml line with a 0.0 withholding (doesnt apply at that time) but if the amount of the withholding exceeds in another invoice, will be override the value with the new withholding amount.
309 Otherwise:
310 Create a new xml line.
311 Write True or False value on the invoice line, and assigns the xml id created in the previuos step.
312 '''
313 il_ids = self.pool.get('account.invoice.line').browse(cr, uid,line)
314
315 if il_ids.wh_xml_id:
316 self.pool.get('account.invoice.line').write(cr, uid, line, {'apply_wh': apply})
317 self.pool.get('islr.xml.wh.line').write(cr,uid,il_ids.wh_xml_id.id,{'wh':dict['wh']})
318 else:
319 if type in ('out_invoice', 'out_refund'):
320 self.pool.get('account.invoice.line').write(cr, uid, line, {'apply_wh': apply})
321 else:
322 self.pool.get('account.invoice.line').write(cr, uid, line, {'apply_wh': apply,'wh_xml_id':self._create_islr_xml_wh_line(cr, uid,line,dict)})
323 message = _("Withholding income xml line generated.")
324 self.log(cr, uid, line, message)
325
326 def _create_islr_xml_wh_line(self,cr, uid, line, dict):
327 '''
328 Create a new xml line
329 '''
330 inv_id = self.pool.get('account.invoice.line').browse(cr, uid,line).invoice_id
331 return self.pool.get('islr.xml.wh.line').create(cr, uid, {'name': dict['name_rate'],
332 'concept_id': dict['concept'],
333 'period_id': inv_id.period_id.id,
334 'partner_vat':dict['vat'],
335 'invoice_number': dict['number'],
336 'control_number': dict['control'],
337 'concept_code':dict['code'],
338 'base': dict['subtotal'],
339 'porcent_rete':dict['perc'],
340 'wh':dict['wh'],
341 'rate_id': dict['rate_id'],
342 'account_invoice_line_id': line,
343 'account_invoice_id': inv_id.id,
344 'partner_id': inv_id.partner_id.id,
345 })
346
347 def _get_wh(self,cr, uid, subtract,concept, wh_dict, dict_rate, apply,context=None):
348 '''
349 Returns a dictionary containing all the values ​​of the retention of an invoice line.
350 '''
351 if context is None:
352 context={}
353 res= {}
354 inv_obj= self.pool.get('account.invoice')
355 if apply: # Si se va a aplicar retencion.
356 for line in wh_dict[concept]['lines']:
357 wh_calc, subtotal = self._get_wh_calc(cr,uid,line,dict_rate[concept]) # Obtengo el monto de retencion y el monto base sobre el cual se retiene
358 if subtract >= wh_calc:
359 wh = 0.0
360 subtract -= wh_calc
361 else:
362 wh = wh_calc - subtract
363 subtract_write= subtract
364 subtract=0.0
365 inv_id = self.pool.get('account.invoice.line').browse(cr, uid,line).invoice_id.id
366 type = inv_obj.browse(cr,uid,inv_id).type
367 res[line]={ 'vat': self._get_inv_data(cr, uid, line)[0],
368 'number': self._get_inv_data(cr, uid, line)[1],
369 'control': self._get_inv_data(cr, uid, line)[2],
370 'concept': concept,
371 'code':dict_rate[concept][4],
372 'subtotal': subtotal,
373 'perc':dict_rate[concept][2],
374 'wh':wh,
375 'apply':apply,
376 'rate_id':dict_rate[concept][5],
377 'name_rate': dict_rate[concept][6]}
378 if not context.get('test_from_wkf',False):
379 self._write_wh_apply(cr,uid,line,res[line],apply,type)
380 inv_obj.write(cr, uid, inv_id, {'status': 'pro'})
381 else: # Si no aplica retencion
382 for line in wh_dict[concept]['lines']:
383 subtotal = self._get_wh_calc(cr,uid,line,dict_rate[concept])[1]
384 inv_id = self.pool.get('account.invoice.line').browse(cr, uid,line).invoice_id.id
385 type = inv_obj.browse(cr,uid,inv_id).type
386 res[line]={ 'vat': self._get_inv_data(cr, uid, line)[0],
387 'number': self._get_inv_data(cr, uid, line)[1],
388 'control': self._get_inv_data(cr, uid, line)[2],
389 'concept': concept,
390 'code':dict_rate[concept][4],
391 'subtotal': subtotal,
392 'perc':dict_rate[concept][2],
393 'wh':0.0,
394 'apply':apply,
395 'rate_id':dict_rate[concept][5],
396 'name_rate': dict_rate[concept][6]}
397 if not context.get('test_from_wkf',False):
398 self._write_wh_apply(cr,uid,line,res[line],apply,type)
399 inv_obj.write(cr, uid, inv_id, {'status': 'pro'})
400 return res
401
402
403 def _get_wh_apply(self,cr,uid,dict_rate,wh_dict,nature,context=None):
404 '''
405 Returns a dictionary containing all data for the withholding. Each item is an invoice line.
406 '''
407 if context is None:
408 context={}
409 res = {}
410 for concept in wh_dict:
411 if not wh_dict[concept]['wh']: #Si nunca se ha aplicado retencion con este concepto.
412 if wh_dict[concept]['base'] >= dict_rate[concept][1]: # Si el monto base que suman todas las lineas de la factura es mayor o igual al monto minimo de la tasa.
413 subtract = dict_rate[concept][3] # Obtengo el sustraendo a aplicar. Existe sustraendo porque es la primera vez.
414 res.update(self._get_wh(cr, uid, subtract,concept, wh_dict, dict_rate, True,context=context))# El True sirve para asignar al campo booleano de la linea de la factura True, para asi marcar de una vez que ya fue retenida, para una posterior busqueda.
415 else: # Si el monto base no supera el monto minimo de la tasa(de igual forma se deb declarar asi no supere.)
416 subtract = 0.0
417 res.update(self._get_wh(cr, uid, subtract,concept, wh_dict, dict_rate, False,context=context))
418 else: #Si ya se aplico alguna vez la retencion, se aplica rete de una vez, sobre la base sin chequear monto minimo.(Dentro de este periodo)
419 if nature:
420 subtract = dict_rate[concept][3]
421 res.update(self._get_wh(cr, uid, subtract,concept, wh_dict, dict_rate, True,context=context))
422 else:
423 subtract = 0.0
424 res.update(self._get_wh(cr, uid, subtract,concept, wh_dict, dict_rate, True,context=context))# El True sirve para indicar que la linea si se va a retener.
425 return res
426
427
428 def _get_amount(self,cr,uid,dict):
429 '''
430 Get the sum of the withholding amount by concept.
431 '''
432 dict_concept = {}
433 for key in dict:
434 x = dict[key]['concept']
435 y = dict[key]['wh']
436 if not dict_concept.get(x,False):
437 dict_concept[x] = y
438 else:
439 dict_concept[x]+= y
440 return dict_concept
441
442
443 def _get_dict_concepts(self,cr,uid,dict):
444 '''
445 Get a dictionary grouped by concept:
446 {1:[{64: {'control': '', 'perc': 0.050000000000000003, 'concept': 1, 'number': False, 'wh': 0.0, 'code': u'A', 'rate_id': 1, 'apply': True, 'subtotal': 500.0, 'vat': u'J123456789'}},
447 {65: {'control': '', 'perc': 0.050000000000000003, 'concept': 1, 'number': False, 'wh': 0.0, 'code': u'A', 'rate_id': 1, 'apply': True, 'subtotal': 300.0, 'vat': u'J123456789'}}
448 ],
449 2:[{63: {'control': '', 'perc': 0.029999999999999999, 'concept': 2, 'number': False, 'wh': 0.0, 'code': u'002', 'rate_id': 2, 'apply': True, 'subtotal': 1000.0, 'vat': u'J123456789'}}
450 ]}
451 '''
452 dict_concepts = {}
453 for key in dict:
454 x = dict[key]['concept']
455 y = dict[key]
456 if not dict_concepts.get(x,False):
457 if dict[key]['apply']:
458 dict_concepts[x]=[]
459 dict_concepts[x].append({key:y})
460 else:
461 if dict[key]['apply']:
462 dict_concepts[x].append({key:y})
463 return dict_concepts
464
465
466 def get_journal(self,cr,uid,inv_brw):
467 '''
468 Assign the corresponding journal according to each type of withholding (purchase, sale). The journal types are created in retencion_iva
469 '''
470 tipo='Sale'
471 tipo2='islr_sale'
472 journal_id = None
473 journal_obj = self.pool.get('account.journal')
474 if inv_brw.type == 'out_invoice' or inv_brw.type =='out_refund':
475 journal_id = journal_obj.search(cr, uid, [('type', '=', 'islr_sale')], limit=1)
476 else:
477 journal_id = journal_obj.search(cr, uid, [('type', '=', 'islr_purchase')], limit=1)
478 tipo = 'Purchase'
479 tipo2 = 'islr_purchase'
480 if not journal_id:
481 raise osv.except_osv(_('Invalid action !'),_("Impossible withholding income, because the journal of withholding income for the '%s' has not been created with the type '%s'") % (tipo,tipo2))
482
483 return journal_id[0] or None
484
485 def button_confirm(self, cr, uid, ids, context=None):
486 return self.write(cr, uid, ids, {'state': 'confirmed'})
487
488 def _create_islr_wh_doc(self,cr,uid,inv_brw,dict):
489 '''
490 To create in the islr_wh_doc model
491 '''
492 islr_wh_doc_id=0
493 wh_doc_obj = self.pool.get('islr.wh.doc')
494 inv_obj =self.pool.get('account.invoice.line')
495 inv_brw = inv_brw.invoice_id
496 inv_brw2 = inv_obj.browse(cr,uid,dict.keys())
497 islr_wh_doc_id = wh_doc_obj.create(cr,uid,
498 {'name': wh_doc_obj.retencion_seq_get(cr, uid),
499 'partner_id': inv_brw.partner_id.id,
500 'invoice_id': inv_brw.id,
501 'period_id': inv_brw.period_id.id,
502 'account_id': inv_brw.account_id.id,
503 'type': inv_brw.type,
504 'journal_id': self.get_journal(cr,uid,inv_brw),
505 'islr_wh_doc_id': [(6,0,[i.invoice_id.id for i in inv_brw2])]
506 })
507
508 wf_service = netsvc.LocalService("workflow")
509 wf_service.trg_validate(uid, 'islr.wh.doc', islr_wh_doc_id, 'button_confirm', cr)
510# wf_service.trg_write(uid, 'islr.wh.doc', islr_wh_doc_id, cr)
511 return islr_wh_doc_id
512
513
514 def _create_doc_line(self,cr,uid, inv_brw,key2,islr_wh_doc_id,dictt,dictc):
515 '''
516 To create in the islr_wh_doc_line model
517 '''
518 doc_line_obj = self.pool.get('islr.wh.doc.line')
519 rate_obj = self.pool.get('islr.rates')
520 dict_concept = self._get_amount(cr,uid,dictt)
521 inv_line_id = dictc[key2][0].keys()[0]
522 rate_id = dictc[key2][0][inv_line_id]['rate_id']
523
524 islr_wh_doc_line_id = doc_line_obj.create(cr,uid,
525 {'islr_wh_doc_id':islr_wh_doc_id,
526 'concept_id':key2,
527 'islr_rates_id':rate_id,
528 'invoice_id': inv_brw.invoice_id.id,
529 'retencion_islr': rate_obj.browse(cr,uid,rate_id).wh_perc,
530 'amount':dict_concept[key2],})
531
532 return islr_wh_doc_line_id
533
534 def _create_doc_invoices(self,cr,uid,key,islr_wh_doc_id):
535 '''
536 To create in the islr_wh_doc_invoices model
537 '''
538 doc_inv_obj = self.pool.get('islr.wh.doc.invoices')
539 inv_id = key
540 islr_wh_doc_invoices_id = doc_inv_obj.create(cr,uid,{'invoice_id':inv_id,'islr_wh_doc_id':islr_wh_doc_id})
541
542
543 def _write_wh_xml(self,cr,uid,key,islr_wh_doc_line_id):
544 '''
545 Write in the xml_wh_line model
546 '''
547 inv_obj =self.pool.get('account.invoice.line')
548 xml_obj = self.pool.get('islr.xml.wh.line')
549 xml_id = inv_obj.browse(cr,uid,key).wh_xml_id.id
550 xml_obj.write(cr, uid, xml_id, {'islr_wh_doc_line_id':islr_wh_doc_line_id})
551
552
553 def _get_inv_id(self,cr,uid,dict):
554 '''
555 Get the invoice obj_browse
556 '''
557 inv_obj =self.pool.get('account.invoice.line')
558 line_ids = [key for key in dict if dict[key]['apply']]
559 line_ids.sort()
560 return line_ids and inv_obj.browse(cr,uid,line_ids[-1]) or False
561
562
563 def _logic_create(self,cr,uid,dict,wh_doc_id):
564 '''
565 Handling of all the logic for generating lines on models.
566 '''
567 dictc = self._get_dict_concepts(cr,uid,dict)
568 inv_brw = self._get_inv_id(cr,uid,dict)
569 inv_obj =self.pool.get('account.invoice.line')
570 islr_wh_doc_id=None
571
572 if inv_brw:
573 if dictc and not wh_doc_id:
574 islr_wh_doc_id = self._create_islr_wh_doc(cr,uid,inv_brw,dict)
575 else:
576 islr_wh_doc_id = wh_doc_id
577 key_lst = []
578 if islr_wh_doc_id:
579 for key2 in dictc:
580 inv_line_id = dictc[key2][0].keys()[0]
581 islr_wh_doc_line_id = self._create_doc_line(cr,uid,inv_brw,key2,islr_wh_doc_id,dict,dictc)
582 for line in dictc[key2]:
583 inv_line_id2 = dictc[key2][0].keys()[0]
584 for key in line:
585 key_lst.append(inv_obj.browse(cr,uid,key).invoice_id.id)
586 if not wh_doc_id:
587 self._write_wh_xml(cr,uid,key,islr_wh_doc_line_id)
588 for key in set(key_lst):
589 self._create_doc_invoices(cr,uid,key,islr_wh_doc_id)
590
591 self.pool.get('account.invoice').write(cr,uid,inv_brw.invoice_id.id,{'islr_wh_doc_id':islr_wh_doc_id})
592
593 message = _("Withholding income voucher '%s' generated.") % self.pool.get('islr.wh.doc').browse(cr,uid,islr_wh_doc_id).name
594 self.log(cr, uid, islr_wh_doc_id, message)
595 else:
596 pass
597 else:
598 pass
599 return islr_wh_doc_id
600
601 def action_ret_islr(self, cr, uid, ids, context={}):
602 return self.pool.get('islr.wh.doc').action_ret_islr(cr,uid,ids,context)
603
604 def _check_wh_islr(self, cr, uid, ids, context=None):
605 if context is None:
606 context={}
607
608 wh_apply=[]
609 # The two function being called below should undergo overhauling
610 # right now it takes an object as and argument instead of an integer
611 invoice = self.browse(cr, uid, ids[0], context=context)
612 vendor, buyer, wh = self._get_partners(cr, uid, invoice)
613 concept_list = self._get_concepts(cr, uid, invoice)
614 wh_apply.append(wh)
615 wh_apply.append(concept_list)
616
617 return invoice, vendor, buyer, concept_list, all(wh_apply)
618
619 def _check_do_wh(self, cr, uid, ids, invoice, vendor, buyer, concept_list, context=None):
620 if context is None:
621 context={}
622 wh_dict = self._get_service_wh(cr, uid, invoice, concept_list)
623 residence = self._get_residence(cr, uid, vendor, buyer)
624 nature = self._get_nature(cr, uid, vendor)
625 dict_rate = self._get_rate_dict(cr, uid, concept_list, residence, nature,context=context)
626 self._pop_dict(cr,uid,concept_list,dict_rate,wh_dict)
627 dict_completo = self._get_wh_apply(cr,uid,dict_rate,wh_dict,nature,context=context)
628 inv_brw = self._get_inv_id(cr,uid,dict_completo)
629
630 return bool(inv_brw)
631
632 def check_wh_islr_apply(self, cr, uid, ids, context=None):
633 '''
634 This Method test if given certain conditions it is
635 possible to create a new withholding document
636 '''
637 #TODO: Este metodo deberia devolver true ya que es un metodo "check"
638 if context is None:
639 context={}
640
641 invoice, vendor, buyer, concept_list, wh_apply = self._check_wh_islr(cr, uid, ids, context=context)
642
643 do_wh = False
644 if wh_apply:
645 context.update({'test_from_wkf':True})
646 do_wh = self._check_do_wh(cr, uid, ids, invoice, vendor, buyer, concept_list, context=context)
647
648 return all([wh_apply,do_wh])
649
650 def check_wh_islr_xml(self, cr, uid, ids, context=None):
651 '''
652 This Method test if given certain conditions it is
653 __not__ possible to create a new withholding document
654 but the xml elements needed to create a legal report
655 '''
656 if context is None:
657 context={}
658
659 invoice, vendor, buyer, concept_list, wh_apply = self._check_wh_islr(cr, uid, ids, context=context)
660
661 do_wh = True
662 if wh_apply:
663 context.update({'test_from_wkf':True})
664 do_wh = self._check_do_wh(cr, uid, ids, invoice, vendor, buyer, concept_list, context=context)
665
666 return all([wh_apply,not do_wh])
667
668 def action_islr_xml(self, cr, uid, ids, context=None):
669 '''
670 This Method creates the xml elements needed to provide a legal report
671 '''
672 if context is None:
673 context={}
674
675 invoice, vendor, buyer, concept_list, wh_apply = self._check_wh_islr(cr, uid, ids, context=context)
676
677 if wh_apply:
678 self._check_do_wh(cr, uid, ids, invoice, vendor, buyer, concept_list, context=context)
679
680 return True
681
682 def check_invoice_type(self, cr, uid, ids, context=None):
683 '''
684 This method test the invoice types to create a new withholding document
685 '''
686 #TODO: change on workflow
687 if context is None:
688 context={}
689 obj = self.browse(cr, uid, ids[0],context=context)
690 if obj.type in ('in_invoice', 'in_refund'):
691 return True
692 return False
693
694 def validate_wh_income_done(self, cr, uid, ids, context=None):198 def validate_wh_income_done(self, cr, uid, ids, context=None):
695 """199 """
696 Method that check if wh income is validated in invoice refund.200 Method that check if wh income is validated in invoice refund.
@@ -710,12 +214,3 @@
710 return True214 return True
711215
712account_invoice()216account_invoice()
713
714
715
716
717
718
719
720
721
722217
=== modified file 'l10n_ve_withholding_islr/model/islr_wh_concept.py'
--- l10n_ve_withholding_islr/model/islr_wh_concept.py 2012-12-09 23:55:45 +0000
+++ l10n_ve_withholding_islr/model/islr_wh_concept.py 2013-01-14 19:15:27 +0000
@@ -38,7 +38,7 @@
38 Model to create the withholding concepts38 Model to create the withholding concepts
39 '''39 '''
40 _name='islr.wh.concept'40 _name='islr.wh.concept'
41 _description = 'Withholding Income Concept'41 _description = 'Income Withholding Concept'
4242
43 _columns={43 _columns={
44 'name':fields.char('Withholding Concept', translate=True,size=256,required=True,help="Name of Withholding Concept, Example: Honorarios Profesionales, Comisiones a..."),44 'name':fields.char('Withholding Concept', translate=True,size=256,required=True,help="Name of Withholding Concept, Example: Honorarios Profesionales, Comisiones a..."),
4545
=== modified file 'l10n_ve_withholding_islr/model/islr_wh_doc.py'
--- l10n_ve_withholding_islr/model/islr_wh_doc.py 2012-12-09 23:55:45 +0000
+++ l10n_ve_withholding_islr/model/islr_wh_doc.py 2013-01-14 19:15:27 +0000
@@ -41,13 +41,14 @@
41 type = context.get('type', 'in_invoice')41 type = context.get('type', 'in_invoice')
42 return type42 return type
4343
44 def _get_journal(self, cr, uid, context):44 def _get_journal(self, cr, uid, context=None):
45 if context is None:45 if context is None:
46 context = {}46 context = {}
47 type_inv = context.get('type')
48 type2journal = {'out_invoice': 'retislrSale', 'in_invoice': 'retislrPurchase', 'out_refund': 'retislrSale', 'in_refund': 'retislrPurchase'}
49 journal_obj = self.pool.get('account.journal')47 journal_obj = self.pool.get('account.journal')
50 res = journal_obj.search(cr, uid, [('type', '=', type2journal.get(type_inv, 'retislrPurchase'))], limit=1)48 if context.get('type') in ('out_invoice', 'out_refund'):
49 res = journal_obj.search(cr, uid, [('type', '=', 'islr_sale')], limit=1)
50 else:
51 res = journal_obj.search(cr, uid, [('type', '=', 'islr_purchase')], limit=1)
51 if res:52 if res:
52 return res[0]53 return res[0]
53 else:54 else:
@@ -68,18 +69,6 @@
68 res[rete.id] += line.amount69 res[rete.id] += line.amount
69 return res70 return res
7071
71 def _get_period(self,cr,uid,ids,name,args,context={}):
72 res = {}
73 wh_doc_brw = self.browse(cr,uid,ids, context=None)
74 for doc in wh_doc_brw:
75 res[doc.id] = False
76 if doc.date_ret:
77 period_ids = self.pool.get('account.period').search(cr,uid,[('date_start','<=',doc.date_ret or time.strftime('%Y-%m-%d')),('date_stop','>=',doc.date_ret or time.strftime('%Y-%m-%d'))])
78 if len(period_ids):
79 period_id = period_ids[0]
80 res[doc.id] = period_id
81 return res
82
83 def filter_lines_invoice(self,cr,uid,partner_id,context):72 def filter_lines_invoice(self,cr,uid,partner_id,context):
84 inv_obj = self.pool.get('account.invoice')73 inv_obj = self.pool.get('account.invoice')
85 invoice_obj = self.pool.get('islr.wh.doc.invoices')74 invoice_obj = self.pool.get('islr.wh.doc.invoices')
@@ -95,7 +84,7 @@
95 return inv_ids84 return inv_ids
96 85
97 _name = "islr.wh.doc"86 _name = "islr.wh.doc"
98 _description = 'Document Withholding Income'87 _description = 'Document Income Withholding'
99 _columns= {88 _columns= {
100 'name': fields.char('Description', size=64,readonly=True, states={'draft':[('readonly',False)]}, required=True, help="Voucher description"),89 'name': fields.char('Description', size=64,readonly=True, states={'draft':[('readonly',False)]}, required=True, help="Voucher description"),
101 'code': fields.char('Code', size=32, readonly=True, states={'draft':[('readonly',False)]}, help="Voucher reference"),90 'code': fields.char('Code', size=32, readonly=True, states={'draft':[('readonly',False)]}, help="Voucher reference"),
@@ -116,14 +105,14 @@
116 ],'State', readonly=True, help="Voucher state"),105 ],'State', readonly=True, help="Voucher state"),
117 'date_ret': fields.date('Accounting Date', help="Keep empty to use the current date"),106 'date_ret': fields.date('Accounting Date', help="Keep empty to use the current date"),
118 'date_uid': fields.date('Withhold Date', readonly=True, states={'draft':[('readonly',False)]}, help="Voucher date"),107 'date_uid': fields.date('Withhold Date', readonly=True, states={'draft':[('readonly',False)]}, help="Voucher date"),
119 'period_id': fields.function(_get_period, method=True, required=False, type='many2one',relation='account.period', string='Period', help="Period when the accounts entries were done"),108 'period_id': fields.many2one('account.period', 'Period', help="Period when the accounts entries were done"),
120 'account_id': fields.many2one('account.account', 'Account', required=True, readonly=True, states={'draft':[('readonly',False)]}, help="Account Receivable or Account Payable of partner"),109 'account_id': fields.many2one('account.account', 'Account', required=True, readonly=True, states={'draft':[('readonly',False)]}, help="Account Receivable or Account Payable of partner"),
121 'partner_id': fields.many2one('res.partner', 'Partner', readonly=True, required=True, states={'draft':[('readonly',False)]}, help="Partner object of withholding"),110 'partner_id': fields.many2one('res.partner', 'Partner', readonly=True, required=True, states={'draft':[('readonly',False)]}, help="Partner object of withholding"),
122 'currency_id': fields.many2one('res.currency', 'Currency', required=True, readonly=True, states={'draft':[('readonly',False)]}, help="Currency in which the transaction takes place"),111 'currency_id': fields.many2one('res.currency', 'Currency', required=True, readonly=True, states={'draft':[('readonly',False)]}, help="Currency in which the transaction takes place"),
123 'journal_id': fields.many2one('account.journal', 'Journal', required=True,readonly=True, states={'draft':[('readonly',False)]}, help="Journal where accounting entries are recorded"),112 'journal_id': fields.many2one('account.journal', 'Journal', required=True,readonly=True, states={'draft':[('readonly',False)]}, help="Journal where accounting entries are recorded"),
124 'company_id': fields.many2one('res.company', 'Company', required=True, help="Company"),113 'company_id': fields.many2one('res.company', 'Company', required=True, help="Company"),
125 'amount_total_ret':fields.function(_get_amount_total,method=True, string='Amount Total', type='float', digits_compute= dp.get_precision('Withhold ISLR'), help="Total Withheld amount"),114 'amount_total_ret':fields.function(_get_amount_total,method=True, string='Amount Total', type='float', digits_compute= dp.get_precision('Withhold ISLR'), help="Total Withheld amount"),
126 'concept_ids': fields.one2many('islr.wh.doc.line','islr_wh_doc_id','Withholding Income Concept', readonly=True, states={'draft':[('readonly',False)]}),115 'concept_ids': fields.one2many('islr.wh.doc.line','islr_wh_doc_id','Income Withholding Concept', readonly=True, states={'draft':[('readonly',False)]}),
127 'invoice_ids':fields.one2many('islr.wh.doc.invoices','islr_wh_doc_id','Withheld Invoices'),116 'invoice_ids':fields.one2many('islr.wh.doc.invoices','islr_wh_doc_id','Withheld Invoices'),
128 'invoice_id':fields.many2one('account.invoice','Invoice',readonly=False,help="Invoice to make the accounting entry"),117 'invoice_id':fields.many2one('account.invoice','Invoice',readonly=False,help="Invoice to make the accounting entry"),
129 'islr_wh_doc_id': fields.one2many('account.invoice','islr_wh_doc_id','Invoices',states={'draft':[('readonly',False)]}),118 'islr_wh_doc_id': fields.one2many('account.invoice','islr_wh_doc_id','Invoices',states={'draft':[('readonly',False)]}),
@@ -142,22 +131,39 @@
142 'user_id': lambda s, cr, u, c: u,131 'user_id': lambda s, cr, u, c: u,
143 }132 }
144133
134 def check_income_wh(self, cr, uid, ids, context=None):
135 context = context or {}
136 ids = isinstance(ids, (int, long)) and [ids] or ids
137 obj = self.browse(cr, uid, ids[0],context=context)
138 res = {}
139 for wh_line in obj.invoice_ids:
140 if not wh_line.islr_xml_id:
141 res[wh_line.id] = (wh_line.invoice_id.name,
142 wh_line.invoice_id.number, wh_line.invoice_id.reference)
143 if res:
144 note = _('The Following Invoices Have not yet been withheld:\n\n')
145 for i in res:
146 note += '* %s, %s, %s\n'%res[i]
147 note += _('\nPlease, Load the Taxes to be withheld and Try Again')
148 raise osv.except_osv(_('Invoices with Missing Withheld Taxes!'),note)
149 return True
150
151 def compute_amount_wh(self, cr, uid, ids, context=None):
152 context = context or {}
153 ids = isinstance(ids, (int, long)) and [ids] or ids
154 iwdi_obj = self.pool.get('islr.wh.doc.invoices')
155 iwd_brw = self.browse(cr, uid, ids[0], context=context)
156 for iwdi_brw in iwd_brw.invoice_ids:
157 iwdi_obj.load_taxes(cr, uid, iwdi_brw.id, context=context)
158 return True
145 def validate(self, cr,uid,ids,*args):159 def validate(self, cr,uid,ids,*args):
146160
147 if args[0]in ['in_invoice','in_refund'] and args[1] and args[2]:161 if args[0]in ['in_invoice','in_refund'] and args[1] and args[2]:
148 return True162 return True
149163
150 def action_process(self,cr,uid,ids, *args):164 def action_process(self,cr,uid,ids, context=None):
151 inv_obj=self.pool.get('account.invoice')165 # TODO: ERASE THE REGARDING NODE IN THE WORKFLOW
152 context = {}166 # METHOD HAVE BEEN LEFT FOR BACKWARD COMPATIBILITY
153 wh_doc_brw = self.browse(cr, uid, ids, context=None)
154 inv_ids = []
155
156 for wh_doc in wh_doc_brw:
157 for wh_doc_line in wh_doc.islr_wh_doc_id:
158 inv_ids.append(wh_doc_line.id)
159 context["wh_doc_id"]=ids[0]
160 inv_obj.action_ret_islr(cr, uid, inv_ids,context)
161 return True167 return True
162168
163 def action_cancel_process(self,cr,uid,ids,context=None):169 def action_cancel_process(self,cr,uid,ids,context=None):
@@ -226,9 +232,10 @@
226 vals['code'] = code232 vals['code'] = code
227 return super(islr_wh_doc, self).create(cr, uid, vals, context)233 return super(islr_wh_doc, self).create(cr, uid, vals, context)
228234
229 def action_confirm1(self, cr, uid, ids, context={}):235 def action_confirm(self, cr, uid, ids, context=None):
230 return self.write(cr, uid, ids, {'state':'confirmed'})236 context = context or {}
231237 ids = isinstance(ids, (int, long)) and [ids] or ids
238 return self.write(cr, uid, ids[0], {'state':'confirmed'})
232239
233 def action_number(self, cr, uid, ids, *args):240 def action_number(self, cr, uid, ids, *args):
234 obj_ret = self.browse(cr, uid, ids)[0]241 obj_ret = self.browse(cr, uid, ids)[0]
@@ -243,21 +250,12 @@
243 'WHERE id=%s', (number, id))250 'WHERE id=%s', (number, id))
244 return True251 return True
245252
246 def action_done1(self, cr, uid, ids, context={}):
247 self.action_number(cr, uid, ids)
248 self.action_move_create(cr, uid, ids)
249 self.write(cr, uid, ids, {'state':'done'})
250 return True
251
252 def action_cancel(self,cr,uid,ids,context={}):253 def action_cancel(self,cr,uid,ids,context={}):
253 #~ if self.browse(cr,uid,ids)[0].type=='in_invoice':254 #~ if self.browse(cr,uid,ids)[0].type=='in_invoice':
254 #~ return True255 #~ return True
255 self.cancel_move(cr,uid,ids)256 self.cancel_move(cr,uid,ids)
256 self.action_cancel_process(cr,uid,ids,context=context)257 self.action_cancel_process(cr,uid,ids,context=context)
257 return True258 return True
258
259
260
261259
262 def cancel_move (self,cr,uid,ids, *args):260 def cancel_move (self,cr,uid,ids, *args):
263 context={}261 context={}
@@ -279,72 +277,69 @@
279 self.write(cr, uid, ids, {'state':'draft'})277 self.write(cr, uid, ids, {'state':'draft'})
280 return True278 return True
281279
282 def action_move_create(self, cr, uid, ids, *args):280 def action_move_create(self, cr, uid, ids, context=None):
283 wh_doc_obj = self.pool.get('islr.wh.doc.line')281 wh_doc_obj = self.pool.get('islr.wh.doc.line')
284 context = {}282 context = context or {}
283 ids = isinstance(ids, (int, long)) and [ids] or ids
285 inv_id = None284 inv_id = None
286 doc_brw = None285 doc_brw = None
287 286 ixwl_obj = self.pool.get('islr.xml.wh.line')
288 for ret in self.browse(cr, uid, ids):287 ret = self.browse(cr, uid, ids[0], context=context)
289 if not ret.date_uid:288 if not ret.date_uid:
290 self.write(cr, uid, [ret.id], {'date_uid':time.strftime('%Y-%m-%d')})289 self.write(cr, uid, [ret.id], {'date_uid':time.strftime('%Y-%m-%d')})
291290
292 if not ret.date_ret:291 if not ret.date_ret:
293 self.write(cr, uid, [ret.id], {'date_ret':time.strftime('%Y-%m-%d')})292 self.write(cr, uid, [ret.id], {'date_ret':time.strftime('%Y-%m-%d')})
294 293
295 period_id = ret.period_id and ret.period_id.id or False294 period_id = ret.period_id and ret.period_id.id or False
296 journal_id = ret.journal_id.id295 journal_id = ret.journal_id.id
297 296
298 if not period_id:297 if not period_id:
299 period_ids = self.pool.get('account.period').search(cr,uid,[('date_start','<=',ret.date_ret or time.strftime('%Y-%m-%d')),('date_stop','>=',ret.date_ret or time.strftime('%Y-%m-%d'))])298 period_ids = self.pool.get('account.period').search(cr,uid,[('date_start','<=',ret.date_ret or time.strftime('%Y-%m-%d')),('date_stop','>=',ret.date_ret or time.strftime('%Y-%m-%d'))])
300 if len(period_ids):299 if len(period_ids):
301 period_id = period_ids[0]300 period_id = period_ids[0]
302 else:301 else:
303 raise osv.except_osv(_('Warning !'), _("Not found a fiscal period to date: '%s' please check!") % (ret.date_ret or time.strftime('%Y-%m-%d')))302 raise osv.except_osv(_('Warning !'), _("Not found a fiscal period to date: '%s' please check!") % (ret.date_ret or time.strftime('%Y-%m-%d')))
304303
305 if ret.concept_ids:304 for line in ret.concept_ids:
306 for line in ret.concept_ids:305 if ret.type in ('in_invoice', 'in_refund'):
307 if ret.type in ('in_invoice', 'in_refund'):306 if line.concept_id.property_retencion_islr_payable:
308 if line.concept_id.property_retencion_islr_payable:307 acc_id = line.concept_id.property_retencion_islr_payable.id
309 acc_id = line.concept_id.property_retencion_islr_payable.id308 inv_id = line.invoice_id.id
310 inv_id = ret.invoice_id.id309 else:
311 else:310 raise osv.except_osv(_('Invalid action !'),_("Impossible income withholding, because the account for withholding of sale is not assigned to the Concept withholding '%s'!")% (line.concept_id.name))
312 raise osv.except_osv(_('Invalid action !'),_("Impossible withholding income, because the account for withholding of sale is not assigned to the Concept withholding '%s'!")% (line.concept_id.name))311 else:
313 else:312 if line.concept_id.property_retencion_islr_receivable:
314 if line.concept_id.property_retencion_islr_receivable:313 acc_id = line.concept_id.property_retencion_islr_receivable.id
315 acc_id = line.concept_id.property_retencion_islr_receivable.id314 inv_id = line.invoice_id.id
316 inv_id = line.invoice_id.id315 else:
317 else:316 raise osv.except_osv(_('Invalid action !'),_("Impossible income withholding, because the account for withholding of purchase is not assigned to the Concept withholding '%s'!") % (line.concept_id.name))
318 raise osv.except_osv(_('Invalid action !'),_("Impossible withholding income, because the account for withholding of purchase is not assigned to the Concept withholding '%s'!") % (line.concept_id.name))317
319318 writeoff_account_id = False
320 writeoff_account_id = False319 writeoff_journal_id = False
321 writeoff_journal_id = False320 amount = line.amount
322 amount = line.amount321
323322 ret_move = self.wh_and_reconcile(cr, uid, [ret.id], inv_id,
324 ret_move = self.wh_and_reconcile(cr, uid, [ret.id], inv_id,323 amount, acc_id, period_id, journal_id, writeoff_account_id,
325 amount, acc_id, period_id, journal_id, writeoff_account_id,324 period_id, writeoff_journal_id, context)
326 period_id, writeoff_journal_id, context)325
327326 # make the retencion line point to that move
328 # make the retencion line point to that move327 rl = {
329 rl = {328 'move_id': ret_move['move_id'],
330 'move_id': ret_move['move_id'],329 }
331 }330 #lines = [(op,id,values)] escribir en un one2many
332 #lines = [(op,id,values)] escribir en un one2many331 lines = [(1, line.id, rl)]
333 lines = [(1, line.id, rl)]332 self.write(cr, uid, [ret.id], {'concept_ids':lines})
334 self.write(cr, uid, [ret.id], {'concept_ids':lines})333
335 334 if lines:
336 if lines:335 message = _("Income withholding voucher '%s' validated and accounting entry generated.") % self.browse(cr, uid, ids[0]).name
337 message = _("Withholding income voucher '%s' validated and accounting entry generated.") % self.browse(cr, uid, ids[0]).name336 self.log(cr, uid, ids[0], message)
338 self.log(cr, uid, ids[0], message) 337
339 338 xml_ids = []
340 for line in ret.concept_ids:339 for line in ret.concept_ids:
341 for xml in line.xml_ids:340 xml_ids += [xml.id for xml in line.xml_ids]
342 if xml.islr_xml_wh_doc.state!='done':341 ixwl_obj.write(cr,uid,xml_ids,{'period_id':period_id},context=context)
343 if xml.period_id.id != period_id:342 self.write(cr,uid,ids,{'period_id':period_id},context=context)
344 self.pool.get('islr.xml.wh.line').write(cr,uid,xml.id,{'period_id':period_id, 'islr_xml_wh_doc':None})
345 else:
346 raise osv.except_osv(_('Invalid action !'),_("Impossible change the period accountig to a withholding that has already been declared."))
347# inv_obj.write(cr, uid, line.invoice_id.id, {'retention':True}, context=context)
348 return True343 return True
349344
350345
@@ -415,46 +410,13 @@
415 self.pool.get('account.invoice').write(cr, uid, invoice_id, {}, context=context)410 self.pool.get('account.invoice').write(cr, uid, invoice_id, {}, context=context)
416 return {'move_id': move_id}411 return {'move_id': move_id}
417412
418
419 def action_ret_islr(self, cr, uid, ids, context={}):
420 #TODO: :
421 inv_obj = self.pool.get('account.invoice')
422 invoices_brw = inv_obj.browse(cr, uid, ids, context)
423 wh_doc_list = []
424 for invoice in invoices_brw:
425 wh_doc_list = inv_obj.pool.get('islr.wh.doc.invoices').search(cr,uid,[('invoice_id','=',invoice.id)])
426 if wh_doc_list: #Chequear que la factura no haya sido retenida.
427 raise osv.except_osv(_('Invalid action !'),_("The Withholding invoice '%s' has already been done!") % (invoice.number))
428 else: # 1.- Si la factura no ha sido retenida
429 wh_dict={}
430 dict_rate={}
431 dict_completo={}
432 vendor, buyer, apply_wh = inv_obj._get_partners(cr,uid,invoice) # Se obtiene el (vendedor, el comprador, si el comprador es agente de retencion)
433 concept_list = inv_obj._get_concepts(cr,uid,invoice)# Se obtiene la lista de conceptos de las lineas de la factura actual.
434 if concept_list: # 2.- Si existe algun concepto de retencion en las lineas de la factura.
435 if apply_wh: # 3.- Si el comprador es agente de retencion
436 wh_dict = inv_obj._get_service_wh(cr, uid, invoice, concept_list) # Se obtiene un dic con la lista de lineas de factura, si se aplico retencion alguna vez, el monto base total de las lineas.
437 residence = inv_obj._get_residence(cr, uid, vendor, buyer) # Retorna el tipo de residencia del vendedor
438 nature = inv_obj._get_nature(cr, uid, vendor) # Retorna la naturaleza del vendedor.
439 dict_rate = inv_obj._get_rate_dict(cr, uid, concept_list, residence, nature,context) # Retorna las tasas por cada concepto
440 inv_obj._pop_dict(cr,uid,concept_list,dict_rate,wh_dict) # Borra los conceptos y las lineas de factura que no tengan tasa asociada.
441 dict_completo = inv_obj._get_wh_apply(cr,uid,dict_rate,wh_dict,nature) # Retorna el dict con todos los datos de la retencion por linea de factura.
442 islr_wh_doc_id=inv_obj._logic_create(cr,uid,dict_completo,context.get('wh_doc_id',False))# Se escribe y crea en todos los modelos asociados al islr.
443 else:
444 raise osv.except_osv(_('Invalid action !'),_("Impossible withholding income, because the supplier '%s' withholding agent is not!") % (buyer.name))
445 else:
446 raise osv.except_osv(_('Invalid action !'),_("Impossible withholding income, because the lines of the invoice has not concept withholding!"))
447 #~ break
448 return islr_wh_doc_id
449
450
451islr_wh_doc()413islr_wh_doc()
452414
453415
454class account_invoice(osv.osv):416class account_invoice(osv.osv):
455 _inherit = 'account.invoice'417 _inherit = 'account.invoice'
456 _columns = {418 _columns = {
457 'islr_wh_doc_id': fields.many2one('islr.wh.doc','Withhold Document',readonly=True,help="Document Withholding Income tax generated from this bill"),419 'islr_wh_doc_id': fields.many2one('islr.wh.doc','Withhold Document',readonly=True,help="Document Income Withholding tax generated from this bill"),
458 }420 }
459 _defaults = {421 _defaults = {
460 'islr_wh_doc_id': lambda *a: 0,422 'islr_wh_doc_id': lambda *a: 0,
@@ -474,7 +436,7 @@
474class islr_wh_doc_invoices(osv.osv):436class islr_wh_doc_invoices(osv.osv):
475 _name = "islr.wh.doc.invoices"437 _name = "islr.wh.doc.invoices"
476 _description = 'Document and Invoice Withheld Income'438 _description = 'Document and Invoice Withheld Income'
477439
478 def _amount_all(self, cr, uid, ids, fieldname, args, context=None):440 def _amount_all(self, cr, uid, ids, fieldname, args, context=None):
479 res = {}441 res = {}
480 for ret_line in self.browse(cr, uid, ids, context):442 for ret_line in self.browse(cr, uid, ids, context):
@@ -491,17 +453,226 @@
491 _columns= {453 _columns= {
492 'islr_wh_doc_id': fields.many2one('islr.wh.doc','Withhold Document', ondelete='cascade', help="Document Retention income tax generated from this bill"),454 'islr_wh_doc_id': fields.many2one('islr.wh.doc','Withhold Document', ondelete='cascade', help="Document Retention income tax generated from this bill"),
493 'invoice_id':fields.many2one('account.invoice','Invoice', help="Withheld invoice"),455 'invoice_id':fields.many2one('account.invoice','Invoice', help="Withheld invoice"),
494 'islr_xml_id':fields.one2many('islr.xml.wh.line','islr_wh_doc_inv_id','Withholding'),456 'islr_xml_id':fields.one2many('islr.xml.wh.line','islr_wh_doc_inv_id','Withholding Lines'),
495 'amount_islr_ret':fields.function(_amount_all, method=True, digits=(16,4), string='Wh. tax amount', multi='all', help="Withholding tax amount"),457 'amount_islr_ret':fields.function(_amount_all, method=True, digits=(16,4), string='Withheld Amount', multi='all', help="Amount withheld from the base amount"),
496 'base_ret': fields.function(_amount_all, method=True, digits=(16,4), string='Wh. amount', multi='all', help="Withholding without tax amount"),458 'base_ret': fields.function(_amount_all, method=True, digits=(16,4), string='Base Amount', multi='all', help="Amount where a withholding is going to be compute from"),
497 }459 }
498 _rec_rame = 'invoice_id'460 _rec_rame = 'invoice_id'
461
462 def _get_concepts(self, cr, uid, ids, context=None):
463 '''
464 Gets a list of withholdable concepts (concept_id) from the invoice lines
465 '''
466 context = context or {}
467 ids = isinstance(ids, (int, long)) and [ids] or ids
468 inv_obj = self.pool.get('account.invoice')
469 concept_set = set()
470 inv_brw = inv_obj.browse(cr, uid, ids[0], context=context)
471 for ail in inv_brw.invoice_line:
472 if ail.concept_id and ail.concept_id.withholdable:
473 concept_set.add(ail.concept_id.id)
474 return list(concept_set)
475
476 def _get_wh(self, cr, uid, ids, concept_id, context=None):
477 '''
478 Returns a dictionary containing all the values ​​of the retention of an invoice line.
479 '''
480 context= context or {}
481 ids = isinstance(ids, (int, long)) and [ids] or ids
482 ixwl_obj= self.pool.get('islr.xml.wh.line')
483 iwdl_obj= self.pool.get('islr.wh.doc.line')
484 iwdl_brw = iwdl_obj.browse(cr, uid, ids[0], context=context)
485
486 vendor, buyer, wh_agent = self._get_partners(cr, uid, iwdl_brw.invoice_id)
487 apply = not vendor.islr_exempt
488 residence = self._get_residence(cr, uid, vendor, buyer)
489 nature = self._get_nature(cr, uid, vendor)
490
491 #rate_base,rate_minimum,rate_wh_perc,rate_subtract,rate_code,rate_id,rate_name
492 rate_tuple = self._get_rate(cr, uid, concept_id, residence, nature, context=context)
493 base = 0
494 for line in iwdl_brw.xml_ids:
495 base += line.account_invoice_line_id.price_subtotal
496 apply = apply and base >= rate_tuple[0]*rate_tuple[1]/100.0
497 wh = 0.0
498 subtract = apply and rate_tuple[3] or 0.0
499 subtract_write=0.0
500 wh_concept = 0.0
501 sb_concept = subtract
502 for line in iwdl_brw.xml_ids:
503 if apply:
504 wh_calc = (rate_tuple[0]/100.0)*rate_tuple[2]*line.account_invoice_line_id.price_subtotal/100.0
505 if subtract >= wh_calc:
506 wh = 0.0
507 subtract -= wh_calc
508 else:
509 wh = wh_calc - subtract
510 subtract_write= subtract
511 subtract=0.0
512 ixwl_obj.write(cr,uid,line.id,{'wh':wh, 'sustract':subtract or subtract_write},
513 context=context)
514 wh_concept+=wh
515 iwdl_obj.write(cr, uid, ids[0],{'amount':wh_concept,
516 'subtract':sb_concept, 'base_amount': base},context=context)
517 return True
518
519
520 def load_taxes(self, cr, uid, ids, context=None):
521 context = context or {}
522 ids = isinstance(ids, (int, long)) and [ids] or ids
523 ixwl_obj = self.pool.get('islr.xml.wh.line')
524 iwdl_obj = self.pool.get('islr.wh.doc.line')
525 ret_line = self.browse(cr, uid, ids[0], context=context)
526 lines = []
527 rates = {}
528 wh_perc= {}
529 xmls = {}
530 if ret_line.invoice_id:
531 #~ Searching & Unlinking for xml lines from the current invoice
532 xml_lines = ixwl_obj.search(cr, uid, [('islr_wh_doc_inv_id', '=', ret_line.id)],context=context)
533 if xml_lines:
534 ixwl_obj.unlink(cr, uid, xml_lines)
535
536 #~ Creating xml lines from the current invoices again
537 ail_brws= [i for i in ret_line.invoice_id.invoice_line if i.concept_id and i.concept_id.withholdable]
538 for i in ail_brws:
539 values = self._get_xml_lines(cr, uid, i, context=context)
540 values.update({'islr_wh_doc_inv_id':ret_line.id,})
541 #~ Vuelve a crear las lineas
542 xml_id = ixwl_obj.create(cr, uid, values, context=context)
543 #~ Write back the new xml_id into the account_invoice_line
544 i.write({'wh_xml_id':xml_id},context=context)
545 lines.append(xml_id)
546 #~ Keeps a log of the rate & percentage for a concept
547 rates[i.concept_id.id]=values['rate_id']
548 wh_perc[i.concept_id.id]=values['porcent_rete']
549 if xmls.get(i.concept_id.id):
550 xmls[i.concept_id.id]+=[xml_id]
551 else:
552 xmls[i.concept_id.id]=[xml_id]
553
554 #~ Searching & Unlinking for concept lines from the current invoice
555 iwdl_ids = iwdl_obj.search(cr, uid, [('invoice_id', '=', ret_line.invoice_id.id)],context=context)
556 if iwdl_ids:
557 iwdl_obj.unlink(cr, uid, iwdl_ids)
558 iwdl_ids=[]
559 #~ Creating concept lines for the current invoice
560 concept_list = self._get_concepts(cr, uid, ret_line.invoice_id.id, context=context)
561 for concept_id in concept_list:
562 iwdl_id=iwdl_obj.create(cr,uid,
563 {'islr_wh_doc_id':ret_line.islr_wh_doc_id.id,
564 'concept_id':concept_id,
565 'islr_rates_id':rates[concept_id],
566 'invoice_id': ret_line.invoice_id.id,
567 'retencion_islr':wh_perc[concept_id],
568 'xml_ids': [(6,0,xmls[concept_id])],
569 }, context=context)
570 self._get_wh(cr, uid, iwdl_id, concept_id, context=context)
571 return True
572
573 def _get_partners(self, cr, uid, invoice):
574 '''
575 Se obtiene: el id del vendedor, el id del comprador de la factura y el campo booleano que determina si el comprador es agente de retencion.
576 '''
577 if invoice.type == 'in_invoice' or invoice.type == 'in_refund':
578 vendor = invoice.partner_id
579 buyer = invoice.company_id.partner_id
580 ret_code = invoice
581 else:
582 buyer = invoice.partner_id
583 vendor = invoice.company_id.partner_id
584 return (vendor, buyer, buyer.islr_withholding_agent)
585
586 def _get_residence(self, cr, uid, vendor, buyer):
587 '''
588 Se determina si la direccion fiscal del comprador es la misma que la del vendedor, con el fin de luego obtener la tasa asociada.
589 Retorna True si es una persona domiciliada o residente. Retorna False si es, no Residente o No Domicialiado.
590 '''
591 vendor_address = self._get_country_fiscal(cr, uid, vendor)
592 buyer_address = self._get_country_fiscal(cr, uid, buyer)
593 if vendor_address and buyer_address:
594 if vendor_address == buyer_address:
595 return True
596 else:
597 return False
598 return False
599
600 def _get_nature(self, cr, uid, partner_id):
601 '''
602 Se obtiene la naturaleza del vendedor a partir del RIF, retorna True si es persona de tipo natural, y False si es juridica.
603 '''
604 if not partner_id.vat:
605 raise osv.except_osv(_('Invalid action !'),_("Impossible income withholding, because the partner '%s' has not vat associated!") % (partner_id.name))
606 return False
607 else:
608 if partner_id.vat[2:3] in 'VvEe' or partner_id.spn:
609 return True
610 else:
611 return False
612
613 def _get_rate(self, cr, uid, concept_id, residence, nature,context):
614 '''
615 Se obtiene la tasa del concepto de retencion, siempre y cuando exista uno asociado a las especificaciones:
616 La naturaleza del vendedor coincida con una tasa.
617 La residencia del vendedor coindica con una tasa.
618 '''
619 ut_obj = self.pool.get('l10n.ut')
620 rate_brw_lst = self.pool.get('islr.wh.concept').browse(cr, uid, concept_id).rate_ids
621 for rate_brw in rate_brw_lst:
622 if rate_brw.nature == nature and rate_brw.residence == residence:
623 #~ (base,min,porc,sust,codigo,id_rate,name_rate)
624 rate_brw_minimum = ut_obj.compute_ut_to_money(cr, uid, rate_brw.minimum, False, context)#metodo que transforma los UVT en pesos
625 rate_brw_subtract = ut_obj.compute_ut_to_money(cr, uid, rate_brw.subtract, False, context)#metodo que transforma los UVT en pesos
626 return (rate_brw.base, rate_brw_minimum, rate_brw.wh_perc, rate_brw_subtract,rate_brw.code,rate_brw.id,rate_brw.name)
627 return ()
628
629 def _get_country_fiscal(self,cr, uid, partner_id,context=None):
630 '''
631 Get the country of the partner
632 '''
633 #TODO: THIS METHOD SHOULD BE IMPROVED
634 #DUE TO OPENER HAS CHANGED THE WAY PARTNER
635 #ARE USED FOR ACCOUNT_MOVE
636 context = context or {}
637 if not partner_id.country_id:
638 raise osv.except_osv(_('Invalid action !'),_("Impossible income withholding, because the partner '%s' country has not been defined in the address!") % (partner_id.name))
639 else:
640 return partner_id.country_id.id
641
642 def _get_xml_lines(self, cr, uid, ail_brw, context=None):
643 context = context or {}
644 vendor, buyer, wh_agent = self._get_partners(cr, uid, ail_brw.invoice_id)
645 residence = self._get_residence(cr, uid, vendor, buyer)
646 nature = self._get_nature(cr, uid, vendor)
647 rate_base,rate_minimum,rate_wh_perc,rate_subtract,rate_code,rate_id,rate_name = self._get_rate(cr, uid, ail_brw.concept_id.id, residence, nature,context=context)
648
649 wh = ((rate_base * ail_brw.price_subtotal /100) * rate_wh_perc)/100.0
650
651 return {
652 'account_invoice_id':ail_brw.invoice_id.id,
653 'islr_wh_doc_line_id':False,
654 'islr_xml_wh_doc':False,
655 'wh':wh, # Debo buscarlo
656 'base':ail_brw.price_subtotal, # La consigo tambien pero desde el rate
657 'period_id':False, # Debemos revisar la definicion porque esta en NOT NULL
658 'invoice_number':ail_brw.invoice_id.reference,
659 'rate_id':rate_id, # La consigo tambien pero desde el rate
660 'partner_id':ail_brw.invoice_id.partner_id.id, #Warning Depende de si es cliente o proveedor
661 'concept_id':ail_brw.concept_id.id,
662 'partner_vat':vendor.vat[2:12], #Warning Depende si es cliente o proveedor
663 'porcent_rete':rate_wh_perc, # La consigo tambien pero desde el rate
664 'control_number':ail_brw.invoice_id.nro_ctrl,
665 'sustract':rate_subtract,# La consigo tambien pero desde el rate
666 'account_invoice_line_id':ail_brw.id,
667 'concept_code':rate_code,# La consigo tambien pero desde el rate
668 }
669
499islr_wh_doc_invoices()670islr_wh_doc_invoices()
500671
501672
502class islr_wh_doc_line(osv.osv):673class islr_wh_doc_line(osv.osv):
503 _name = "islr.wh.doc.line"674 _name = "islr.wh.doc.line"
504 _description = 'Lines of Document Withholding Income'675 _description = 'Lines of Document Income Withholding'
505676
506 def _retention_rate(self, cr, uid, ids, name, args, context=None):677 def _retention_rate(self, cr, uid, ids, name, args, context=None):
507 res = {}678 res = {}
@@ -515,10 +686,12 @@
515 _columns= {686 _columns= {
516 'name': fields.char('Description', size=64, help="Description of the voucher line"),687 'name': fields.char('Description', size=64, help="Description of the voucher line"),
517 'invoice_id': fields.many2one('account.invoice', 'Invoice', ondelete='set null', help="Invoice to withhold"),688 'invoice_id': fields.many2one('account.invoice', 'Invoice', ondelete='set null', help="Invoice to withhold"),
518 'amount':fields.float('Amount', digits_compute= dp.get_precision('Withhold ISLR'), help="Withheld amount"),689 'amount':fields.float('Withheld Amount', digits_compute= dp.get_precision('Withhold ISLR'), help="Withheld amount"),
690 'base_amount':fields.float('Base Amount', digits_compute= dp.get_precision('Withhold ISLR'), help="Base amount"),
691 'subtract':fields.float('Subtract', digits_compute= dp.get_precision('Withhold ISLR'), help="Subtract"),
519 'islr_wh_doc_id': fields.many2one('islr.wh.doc','Withhold Document', ondelete='cascade', help="Document Retention income tax generated from this bill"),692 'islr_wh_doc_id': fields.many2one('islr.wh.doc','Withhold Document', ondelete='cascade', help="Document Retention income tax generated from this bill"),
520 'concept_id': fields.many2one('islr.wh.concept','Withhold Concept', help="Withhold concept associated with this rate"),693 'concept_id': fields.many2one('islr.wh.concept','Withholding Concept', help="Withholding concept associated with this rate"),
521 'retencion_islr':fields.float('Percentage', digits_compute= dp.get_precision('Withhold ISLR'), help="Withholding percentage"),694 'retencion_islr':fields.float('Withholding Rate', digits_compute= dp.get_precision('Withhold ISLR'), help="Withholding Rate"),
522 'retention_rate': fields.function(_retention_rate, method=True, string='Withholding Rate', type='float', help="Withhold rate has been applied to the invoice", digits_compute= dp.get_precision('Withhold ISLR')),695 'retention_rate': fields.function(_retention_rate, method=True, string='Withholding Rate', type='float', help="Withhold rate has been applied to the invoice", digits_compute= dp.get_precision('Withhold ISLR')),
523 'move_id': fields.many2one('account.move', 'Journal Entry', readonly=True, help="Accounting voucher"),696 'move_id': fields.many2one('account.move', 'Journal Entry', readonly=True, help="Accounting voucher"),
524 'islr_rates_id': fields.many2one('islr.rates','Rates', help="Withhold rates"),697 'islr_rates_id': fields.many2one('islr.rates','Rates', help="Withhold rates"),
525698
=== modified file 'l10n_ve_withholding_islr/model/islr_xml_wh.py'
--- l10n_ve_withholding_islr/model/islr_xml_wh.py 2012-12-09 23:55:45 +0000
+++ l10n_ve_withholding_islr/model/islr_xml_wh.py 2013-01-14 19:15:27 +0000
@@ -57,7 +57,7 @@
57 return res57 return res
5858
59 _columns = {59 _columns = {
60 'name':fields.char('Description',128, required=True, select=True, help = "Description about statement of withholding income"),60 'name':fields.char('Description',128, required=True, select=True, help = "Description about statement of income withholding"),
61 'company_id': fields.many2one('res.company', 'Company', required=True, help="Company"),61 'company_id': fields.many2one('res.company', 'Company', required=True, help="Company"),
62 'state': fields.selection([62 'state': fields.selection([
63 ('draft','Draft'),63 ('draft','Draft'),
@@ -66,7 +66,7 @@
66 ('cancel','Cancelled')66 ('cancel','Cancelled')
67 ],'State', readonly=True, help="Voucher state"),67 ],'State', readonly=True, help="Voucher state"),
68 'period_id':fields.many2one('account.period','Period',required=True, help="Period when the accounts entries were done"),68 'period_id':fields.many2one('account.period','Period',required=True, help="Period when the accounts entries were done"),
69 'amount_total_ret':fields.function(_get_amount_total,method=True, digits=(16, 2), readonly=True, string='Withholding Income Amount Total', help="Amount Total of withholding"),69 'amount_total_ret':fields.function(_get_amount_total,method=True, digits=(16, 2), readonly=True, string='Income Withholding Amount Total', help="Amount Total of withholding"),
70 'amount_total_base':fields.function(_get_amount_total_base,method=True, digits=(16, 2), readonly=True, string='Without Tax Amount Total', help="Total without taxes"),70 'amount_total_base':fields.function(_get_amount_total_base,method=True, digits=(16, 2), readonly=True, string='Without Tax Amount Total', help="Total without taxes"),
71 'xml_ids':fields.one2many('islr.xml.wh.line','islr_xml_wh_doc','XML Document Lines', readonly=True ,states={'draft':[('readonly',False)]}),71 'xml_ids':fields.one2many('islr.xml.wh.line','islr_xml_wh_doc','XML Document Lines', readonly=True ,states={'draft':[('readonly',False)]}),
72 'user_id': fields.many2one('res.users', 'Salesman', readonly=True, states={'draft':[('readonly',False)]}),72 'user_id': fields.many2one('res.users', 'Salesman', readonly=True, states={'draft':[('readonly',False)]}),
@@ -79,7 +79,7 @@
79 'user_id': lambda s, cr, u, c: u,79 'user_id': lambda s, cr, u, c: u,
8080
81 'period_id': lambda self,cr,uid,context: self.period_return(cr,uid,context),81 'period_id': lambda self,cr,uid,context: self.period_return(cr,uid,context),
82 'name':lambda self,cr,uid,context : 'Withholding Income '+time.strftime('%m/%Y')82 'name':lambda self,cr,uid,context : 'Income Withholding '+time.strftime('%m/%Y')
83 }83 }
8484
85 def period_return(self,cr,uid,context=None):85 def period_return(self,cr,uid,context=None):
@@ -193,17 +193,17 @@
193 _description = 'Generate XML Lines'193 _description = 'Generate XML Lines'
194 194
195 _columns = {195 _columns = {
196 'concept_id': fields.many2one('islr.wh.concept','Withhold Concept',help="Withhold concept associated with this rate",required=True, ondelete='cascade'),196 'concept_id': fields.many2one('islr.wh.concept','Withholding Concept',help="Withholding concept associated with this rate",required=True, ondelete='cascade'),
197 'period_id':fields.many2one('account.period','Period',required=False, help="Period when the accounts entries were done"),197 'period_id':fields.many2one('account.period','Period',required=False, help="Period when the journal entries were done"),
198 'partner_vat': fields.char('VAT', size=10, required=True, help="Partner VAT"),198 'partner_vat': fields.char('VAT', size=10, required=True, help="Partner VAT"),
199 'invoice_number': fields.char('Invoice Number',size=10,required=True, help="Number of invoice"),199 'invoice_number': fields.char('Invoice Number',size=10,required=True, help="Number of invoice"),
200 'control_number': fields.char('Control Number',size=8,required=True, help="Reference"),200 'control_number': fields.char('Control Number',size=8,required=True, help="Reference"),
201 'concept_code': fields.char('Concept Code', size=10, required=True, help="Concept code"),201 'concept_code': fields.char('Concept Code', size=10, required=True, help="Concept code"),
202 'base': fields.float('Without Tax Amount', required=True, help="Taxable", digits_compute= dp.get_precision('Withhold ISLR')),202 'base': fields.float('Base Amount', required=True, help="Amount where a withholding is going to be computed from", digits_compute= dp.get_precision('Withhold ISLR')),
203 'porcent_rete': fields.float('% Withhold', required=True, help="Percentage of Withhold", digits_compute= dp.get_precision('Withhold ISLR')),203 'porcent_rete': fields.float('Withholding Rate', required=True, help="Withholding Rate", digits_compute= dp.get_precision('Withhold ISLR')),
204 'wh':fields.float('Withheld Amount',required=True, help="Withheld amount to partner", digits_compute= dp.get_precision('Withhold ISLR')),204 'wh':fields.float('Withheld Amount',required=True, help="Withheld amount to partner", digits_compute= dp.get_precision('Withhold ISLR')),
205 'rate_id':fields.many2one('islr.rates', 'Person Type',domain="[('concept_id','=',concept_id)]",required=True, help="Person type"),205 'rate_id':fields.many2one('islr.rates', 'Person Type',domain="[('concept_id','=',concept_id)]",required=True, help="Person type"),
206 'islr_wh_doc_line_id':fields.many2one('islr.wh.doc.line','Withholding Income Document', help="Withhold income document"),206 'islr_wh_doc_line_id':fields.many2one('islr.wh.doc.line','Income Withholding Document', help="Income Withholding Document"),
207 'account_invoice_line_id':fields.many2one('account.invoice.line','Invoice Line', help="Invoice line to Withhold"),207 'account_invoice_line_id':fields.many2one('account.invoice.line','Invoice Line', help="Invoice line to Withhold"),
208 'account_invoice_id':fields.many2one('account.invoice','Invoice', help="Invoice to Withhold"),208 'account_invoice_id':fields.many2one('account.invoice','Invoice', help="Invoice to Withhold"),
209 'islr_xml_wh_doc': fields.many2one('islr.xml.wh.doc','ISLR XML Document', help="Income tax XML Doc"),209 'islr_xml_wh_doc': fields.many2one('islr.xml.wh.doc','ISLR XML Document', help="Income tax XML Doc"),
210210
=== modified file 'l10n_ve_withholding_islr/model/partner.py'
--- l10n_ve_withholding_islr/model/partner.py 2012-12-09 23:55:45 +0000
+++ l10n_ve_withholding_islr/model/partner.py 2013-01-14 19:15:27 +0000
@@ -42,6 +42,9 @@
42 'islr_exempt': fields.boolean('Is it exempt from income withholding?'),42 'islr_exempt': fields.boolean('Is it exempt from income withholding?'),
43 }43 }
44 44
45 _defaults = {
46 'islr_withholding_agent': lambda *a: True,
47 }
45res_partner()48res_partner()
4649
4750
4851
=== modified file 'l10n_ve_withholding_islr/model/product.py'
--- l10n_ve_withholding_islr/model/product.py 2012-12-09 23:55:45 +0000
+++ l10n_ve_withholding_islr/model/product.py 2013-01-14 19:15:27 +0000
@@ -37,7 +37,7 @@
37 _inherit = "product.template"37 _inherit = "product.template"
3838
39 _columns = {39 _columns = {
40 'concept_id': fields.many2one('islr.wh.concept','Withhold Concept',help="Concept Withholding Income to apply to the service", required=False),40 'concept_id': fields.many2one('islr.wh.concept','Withhold Concept',help="Concept Income Withholding to apply to the service", required=False),
41 }41 }
4242
43product_template()43product_template()
@@ -59,7 +59,7 @@
59 if concept_id:59 if concept_id:
60 concept_id = concept_obj.search(cr, uid, [('name','ilike','NO APLICA RETENCION')])[0]60 concept_id = concept_obj.search(cr, uid, [('name','ilike','NO APLICA RETENCION')])[0]
61 else:61 else:
62 raise osv.except_osv(_('Invalid action !'),_("Must create the concept of withholding income"))62 raise osv.except_osv(_('Invalid action !'),_("Must create the concept of income withholding"))
63 63
64 return {'value' : {'concept_id':concept_id or False}} 64 return {'value' : {'concept_id':concept_id or False}}
6565
6666
=== modified file 'l10n_ve_withholding_islr/report/islr_wh_report.xml'
--- l10n_ve_withholding_islr/report/islr_wh_report.xml 2012-12-19 18:17:09 +0000
+++ l10n_ve_withholding_islr/report/islr_wh_report.xml 2013-01-14 19:15:27 +0000
@@ -6,7 +6,7 @@
6 model="islr.wh.doc"6 model="islr.wh.doc"
7 name="islr.wh.doc"7 name="islr.wh.doc"
8 rml="addons/l10n_ve_withholding_islr/report/wh_islr_report.rml" 8 rml="addons/l10n_ve_withholding_islr/report/wh_islr_report.rml"
9 string="Voucher Withholding Income"9 string="Voucher Income Withholding"
10 auto="False"10 auto="False"
11 header="False"11 header="False"
12 menu="False"12 menu="False"
@@ -18,7 +18,7 @@
18 model="islr.xml.wh.doc" 18 model="islr.xml.wh.doc"
19 name="list.wh.islr" 19 name="list.wh.islr"
20 rml="addons/l10n_ve_withholding_islr/report/list_wh_islr_report.rml" 20 rml="addons/l10n_ve_withholding_islr/report/list_wh_islr_report.rml"
21 string="Withholding Income"21 string="Income Withholding"
22 auto = "True"22 auto = "True"
23 header="False"/>23 header="False"/>
2424
2525
=== modified file 'l10n_ve_withholding_islr/view/installer.xml'
--- l10n_ve_withholding_islr/view/installer.xml 2012-12-12 01:44:29 +0000
+++ l10n_ve_withholding_islr/view/installer.xml 2013-01-14 19:15:27 +0000
@@ -4,18 +4,17 @@
4 <record id="wh_islr_config_view" model="ir.ui.view">4 <record id="wh_islr_config_view" model="ir.ui.view">
5 <field name="name">Configure your ISLR Withholdings</field>5 <field name="name">Configure your ISLR Withholdings</field>
6 <field name="model">wh.islr.config</field>6 <field name="model">wh.islr.config</field>
7 <field name="type">form</field>
8 <field name="inherit_id" ref="base.res_config_view_base"/>7 <field name="inherit_id" ref="base.res_config_view_base"/>
9 <field name="arch" type="xml">8 <field name="arch" type="xml">
10 <data>9 <data>
11 <form position="attributes">10 <form position="attributes">
12 <attribute name="string">Withholding income Configuration</attribute>11 <attribute name="string">Income withholding Configuration</attribute>
13 </form>12 </form>
14 13
15 <xpath expr='//group[@string="res_config_contents"]' position='before'>14 <xpath expr='//group[@string="res_config_contents"]' position='before'>
16 <group colspan="4" col="8">15 <group colspan="4" col="8">
17 <group colspan="1" width="220">16 <group colspan="1" width="220">
18 <label align="0.0" string="Configure your company's withholding income" width="200" colspan="2"/>17 <label align="0.0" string="Configure your company's income withholding" width="200" colspan="2"/>
19 </group>18 </group>
20 <separator orientation="vertical" colspan="1" rowspan="15"/>19 <separator orientation="vertical" colspan="1" rowspan="15"/>
21 <group colspan="6">20 <group colspan="6">
2221
=== modified file 'l10n_ve_withholding_islr/view/invoice_view.xml'
--- l10n_ve_withholding_islr/view/invoice_view.xml 2012-12-14 19:49:40 +0000
+++ l10n_ve_withholding_islr/view/invoice_view.xml 2013-01-14 19:15:27 +0000
@@ -11,7 +11,6 @@
11 <record id="account_invoice_wh_islr_customer" model="ir.ui.view">11 <record id="account_invoice_wh_islr_customer" model="ir.ui.view">
12 <field name="name">account.invoice.wh.islr.customer</field>12 <field name="name">account.invoice.wh.islr.customer</field>
13 <field name="model">account.invoice</field>13 <field name="model">account.invoice</field>
14 <field name="type">form</field>
15 <field name="inherit_id" ref="l10n_ve_withholding.wh_inv_customer"/>14 <field name="inherit_id" ref="l10n_ve_withholding.wh_inv_customer"/>
16 <field name="arch" type="xml">15 <field name="arch" type="xml">
17 <xpath expr="//separator[@string='vsep']" position="after">16 <xpath expr="//separator[@string='vsep']" position="after">
@@ -31,7 +30,6 @@
31 <record id="account_invoice_wh_islr_supplier" model="ir.ui.view">30 <record id="account_invoice_wh_islr_supplier" model="ir.ui.view">
32 <field name="name">account.invoice.wh.islr.supplier</field>31 <field name="name">account.invoice.wh.islr.supplier</field>
33 <field name="model">account.invoice</field>32 <field name="model">account.invoice</field>
34 <field name="type">form</field>
35 <field name="inherit_id" ref="l10n_ve_withholding.wh_inv_supplier"/>33 <field name="inherit_id" ref="l10n_ve_withholding.wh_inv_supplier"/>
36 <field name="arch" type="xml">34 <field name="arch" type="xml">
37 <xpath expr="//separator[@string='vsep']" position="after">35 <xpath expr="//separator[@string='vsep']" position="after">
@@ -51,7 +49,6 @@
51 <record model="ir.ui.view" id="view_account_invoice_form_concept_islr">49 <record model="ir.ui.view" id="view_account_invoice_form_concept_islr">
52 <field name="name">account_invoice_concept_islr</field>50 <field name="name">account_invoice_concept_islr</field>
53 <field name="model">account.invoice</field>51 <field name="model">account.invoice</field>
54 <field name="type">form</field>
55 <field name="inherit_id" ref="account.invoice_supplier_form"/>52 <field name="inherit_id" ref="account.invoice_supplier_form"/>
56 <field name="arch" type="xml">53 <field name="arch" type="xml">
57 <xpath expr="//field[@name='quantity']" position="before">54 <xpath expr="//field[@name='quantity']" position="before">
@@ -60,10 +57,20 @@
60 </field>57 </field>
61 </record>58 </record>
6259
60 <record model="ir.ui.view" id="view_account_invoice_form_concept_islr_customer">
61 <field name="name">account.invoice.concept.islr.customer</field>
62 <field name="model">account.invoice</field>
63 <field name="inherit_id" ref="account.invoice_form"/>
64 <field name="arch" type="xml">
65 <xpath expr="//field[@name='quantity']" position="before">
66 <field name="concept_id" required="1"/>
67 </xpath>
68 </field>
69 </record>
70
63 <record model="ir.ui.view" id="view_invoice_line_form_islr">71 <record model="ir.ui.view" id="view_invoice_line_form_islr">
64 <field name="name">account_invoice_line_concept_islr</field>72 <field name="name">account_invoice_line_concept_islr</field>
65 <field name="model">account.invoice.line</field>73 <field name="model">account.invoice.line</field>
66 <field name="type">form</field>
67 <field name="inherit_id" ref="account.view_invoice_line_form"/>74 <field name="inherit_id" ref="account.view_invoice_line_form"/>
68 <field name="arch" type="xml">75 <field name="arch" type="xml">
69 <xpath expr="//field[@name='product_id']" position="before">76 <xpath expr="//field[@name='product_id']" position="before">
@@ -75,7 +82,6 @@
75 <record model="ir.ui.view" id="view_invoice_line_tree_islr">82 <record model="ir.ui.view" id="view_invoice_line_tree_islr">
76 <field name="name">account_invoice_line_tree_concept_islr</field>83 <field name="name">account_invoice_line_tree_concept_islr</field>
77 <field name="model">account.invoice.line</field>84 <field name="model">account.invoice.line</field>
78 <field name="type">tree</field>
79 <field name="inherit_id" ref="account.view_invoice_line_tree"/>85 <field name="inherit_id" ref="account.view_invoice_line_tree"/>
80 <field name="arch" type="xml">86 <field name="arch" type="xml">
81 <xpath expr="//field[@name='name']" position="after">87 <xpath expr="//field[@name='name']" position="after">
@@ -86,9 +92,3 @@
86 92
87 </data>93 </data>
88</openerp>94</openerp>
89
90
91
92
93
94
9595
=== modified file 'l10n_ve_withholding_islr/view/islr_wh_concept_view.xml'
--- l10n_ve_withholding_islr/view/islr_wh_concept_view.xml 2012-12-17 19:11:02 +0000
+++ l10n_ve_withholding_islr/view/islr_wh_concept_view.xml 2013-01-14 19:15:27 +0000
@@ -9,12 +9,11 @@
9 <record id="view_wh_concept_filter" model="ir.ui.view">9 <record id="view_wh_concept_filter" model="ir.ui.view">
10 <field name="name">islr.wh.concept.search</field>10 <field name="name">islr.wh.concept.search</field>
11 <field name="model">islr.wh.concept</field>11 <field name="model">islr.wh.concept</field>
12 <field name="type">search</field>
13 <field name="arch" type="xml">12 <field name="arch" type="xml">
14 <search string="Search Concept of Withholding Income">13 <search string="Search Concept of Income Withholding">
15 <group col="10" colspan="4">14 <group col="10" colspan="4">
16 <filter name="withholdable" string="Withhold" domain="[('withholdable','=','True')]" help="Concept withholding withheld"/>15 <filter name="withholdable" string="Withhold" domain="[('withholdable','=','True')]" help="Concept withholding withheld"/>
17 <filter domain="[('user_id','=',uid)]" help="My Withholding Income" separator="1"/>16 <filter domain="[('user_id','=',uid)]" help="My Income Withholding" separator="1"/>
18 </group>17 </group>
19 </search>18 </search>
20 </field>19 </field>
@@ -23,7 +22,6 @@
23 <record id="view_wh_islr_rate_form" model="ir.ui.view">22 <record id="view_wh_islr_rate_form" model="ir.ui.view">
24 <field name="name">tasas_form</field>23 <field name="name">tasas_form</field>
25 <field name="model">islr.rates</field>24 <field name="model">islr.rates</field>
26 <field name="type">form</field>
27 <field name="arch" type="xml">25 <field name="arch" type="xml">
28 <form string="Rates">26 <form string="Rates">
29 <field name="name" colspan="4"/>27 <field name="name" colspan="4"/>
@@ -43,7 +41,6 @@
43 <record id="view_wh_islr_rate_tree" model="ir.ui.view">41 <record id="view_wh_islr_rate_tree" model="ir.ui.view">
44 <field name="name">tasas_tree</field>42 <field name="name">tasas_tree</field>
45 <field name="model">islr.rates</field>43 <field name="model">islr.rates</field>
46 <field name="type">tree</field>
47 <field name="arch" type="xml">44 <field name="arch" type="xml">
48 <tree string="Rates">45 <tree string="Rates">
49 <field name="name"/>46 <field name="name"/>
@@ -61,9 +58,8 @@
61 <record id="view_wh_concept_islr_tree" model="ir.ui.view">58 <record id="view_wh_concept_islr_tree" model="ir.ui.view">
62 <field name="name">islr.wh.concept_tree</field>59 <field name="name">islr.wh.concept_tree</field>
63 <field name="model">islr.wh.concept</field>60 <field name="model">islr.wh.concept</field>
64 <field name="type">tree</field>
65 <field name="arch" type="xml">61 <field name="arch" type="xml">
66 <tree string="Concept of Withholding Income">62 <tree string="Concept of Income Withholding">
67 <field name="name"/>63 <field name="name"/>
68 <field name="withholdable"/>64 <field name="withholdable"/>
69 </tree>65 </tree>
@@ -73,9 +69,8 @@
73 <record id="view_wh_concept_islr_form" model="ir.ui.view">69 <record id="view_wh_concept_islr_form" model="ir.ui.view">
74 <field name="name">islr.wh.concept_form</field>70 <field name="name">islr.wh.concept_form</field>
75 <field name="model">islr.wh.concept</field>71 <field name="model">islr.wh.concept</field>
76 <field name="type">form</field>
77 <field name="arch" type="xml">72 <field name="arch" type="xml">
78 <form string="Concept of Withholding Income">73 <form string="Concept of Income Withholding">
79 <group colspan="4" col="4">74 <group colspan="4" col="4">
80 <field name="name"/>75 <field name="name"/>
81 <field name="withholdable"/>76 <field name="withholdable"/>
@@ -92,13 +87,13 @@
92 </record>87 </record>
9388
94 <record model="ir.actions.act_window" id="action_wh_islr_concept">89 <record model="ir.actions.act_window" id="action_wh_islr_concept">
95 <field name="name">Concept of Withholding Income</field>90 <field name="name">Concept of Income Withholding</field>
96 <field name="res_model">islr.wh.concept</field>91 <field name="res_model">islr.wh.concept</field>
97 <field name="type">ir.actions.act_window</field>92 <field name="type">ir.actions.act_window</field>
98 <field name="view_type">form</field>93 <field name="view_type">form</field>
99 <field name="view_mode">tree,form</field>94 <field name="view_mode">tree,form</field>
100 <field name="search_view_id" ref="view_wh_concept_filter"/>95 <field name="search_view_id" ref="view_wh_concept_filter"/>
101 <field name="help">With "Concept of Withholding Income" you can create and manage the concept of wittholding income. For each concept is to create and manage rates associated.</field>96 <field name="help">With "Concept of Income Withholding" you can create and manage the concept of wittholding income. For each concept is to create and manage rates associated.</field>
102 </record>97 </record>
103 98
104 <record model="ir.actions.act_window.view" id="action_wh_islr_concept_tree">99 <record model="ir.actions.act_window.view" id="action_wh_islr_concept_tree">
@@ -114,7 +109,7 @@
114 <field name="act_window_id" ref="action_wh_islr_concept"/>109 <field name="act_window_id" ref="action_wh_islr_concept"/>
115 </record>110 </record>
116 111
117 <menuitem name="Concept of Withholding Income" 112 <menuitem name="Concept of Income Withholding"
118 id="menu_action_concept_retention" 113 id="menu_action_concept_retention"
119 parent="menu_wh_configuration_islr"114 parent="menu_wh_configuration_islr"
120 action="action_wh_islr_concept"/>115 action="action_wh_islr_concept"/>
121116
=== modified file 'l10n_ve_withholding_islr/view/islr_wh_doc_view.xml'
--- l10n_ve_withholding_islr/view/islr_wh_doc_view.xml 2012-12-18 13:23:28 +0000
+++ l10n_ve_withholding_islr/view/islr_wh_doc_view.xml 2013-01-14 19:15:27 +0000
@@ -8,19 +8,32 @@
8 =====================================================8 =====================================================
9 -->9 -->
1010
11 <record id="view_islr_wh_doc_invoices_tree_" model="ir.ui.view">
12 <field name="name">islr.wh.doc.invoices_tree</field>
13 <field name="model">islr.wh.doc.invoices</field>
14 <field name="arch" type="xml">
15 <tree string="Withheld Invoices">
16 <field name="invoice_id"/>
17 <field name="islr_xml_id"/>
18 <field name="amount_islr_ret"/>
19 <field name="base_ret"/>
20 </tree>
21 </field>
22 </record>
23
11 <record id="view_islr_wh_doc_invoices_form_" model="ir.ui.view">24 <record id="view_islr_wh_doc_invoices_form_" model="ir.ui.view">
12 <field name="name">islr.wh.doc.invoices_form</field>25 <field name="name">islr.wh.doc.invoices_form</field>
13 <field name="model">islr.wh.doc.invoices</field>26 <field name="model">islr.wh.doc.invoices</field>
14 <field name="type">form</field>
15 <field name="arch" type="xml">27 <field name="arch" type="xml">
16 <form string="Invoices">28 <form string="Invoices">
17 <field29 <field
18 name="invoice_id"30 name="invoice_id"
19 domain="[('partner_id','=',parent.partner_id),('islr_wh_doc_id', '=', False),('state', '=', 'open'),('invoice_line.concept_id.withholdable', '=', True)]"31 domain="[('partner_id','=',parent.partner_id),('islr_wh_doc_id', '=', False),('state', '=', 'open')]"
20 colspan='6'/>32 colspan='6'/>
21 <newline/>33 <newline/>
22 <field name="islr_xml_id" nolabel="1" colspan='4'>34 <field name="islr_xml_id" nolabel="1" colspan='4'>
23 <tree string="Detail of the Concept of Withholding Income">35 <tree string="Detail of the Concept of Income Withholding">
36 <field name="concept_code"/>
24 <field name="rate_id"/>37 <field name="rate_id"/>
25 <field name="wh"/>38 <field name="wh"/>
26 <field name="porcent_rete"/>39 <field name="porcent_rete"/>
@@ -43,15 +56,14 @@
43 <record id="view_wh_islr_filter_customer" model="ir.ui.view">56 <record id="view_wh_islr_filter_customer" model="ir.ui.view">
44 <field name="name">islr.wh.doc.search</field>57 <field name="name">islr.wh.doc.search</field>
45 <field name="model">islr.wh.doc</field>58 <field name="model">islr.wh.doc</field>
46 <field name="type">search</field>
47 <field name="arch" type="xml">59 <field name="arch" type="xml">
48 <search string="Search Withholding Income">60 <search string="Search Income Withholding">
49 <group col="10" colspan="4">61 <group col="10" colspan="4">
50 <filter name="to_process" string="To Process" domain="[('state','=','to_process')]" help="To Process Withholding Income"/>62 <filter name="to_process" string="To Process" domain="[('state','=','to_process')]" help="To Process Income Withholding"/>
51 <filter name="draft" string="Draft" domain="[('state','=','draft')]" help="Draft Withholding Income"/>63 <filter name="draft" string="Draft" domain="[('state','=','draft')]" help="Draft Income Withholding"/>
52 <filter name="confirmed" string="Confirmed" domain="[('state','=','confirmed')]" help="Confirmed Withholding Income"/>64 <filter name="confirmed" string="Confirmed" domain="[('state','=','confirmed')]" help="Confirmed Income Withholding"/>
53 <filter name="done" string="Done" domain="[('state','=','done')]" help="Done Withholding Income"/>65 <filter name="done" string="Done" domain="[('state','=','done')]" help="Done Income Withholding"/>
54 <filter name="cancel" string="Cancel" domain="[('state','=','cancel')]" help="Cancel Withholding Income"/>66 <filter name="cancel" string="Cancel" domain="[('state','=','cancel')]" help="Cancel Income Withholding"/>
55 </group>67 </group>
56 <group expand="1" string="Group By...">68 <group expand="1" string="Group By...">
57 <filter string="Partner" domain="[]" context="{'group_by':'partner_id'}"/>69 <filter string="Partner" domain="[]" context="{'group_by':'partner_id'}"/>
@@ -67,9 +79,8 @@
67 <record id="view_islr_line_tree" model="ir.ui.view">79 <record id="view_islr_line_tree" model="ir.ui.view">
68 <field name="name">islr.wh.doc_line_tree</field>80 <field name="name">islr.wh.doc_line_tree</field>
69 <field name="model">islr.wh.doc.line</field>81 <field name="model">islr.wh.doc.line</field>
70 <field name="type">tree</field>
71 <field name="arch" type="xml">82 <field name="arch" type="xml">
72 <tree string="Lines Withholding Income" editable="bottom" >83 <tree string="Lines Income Withholding" editable="bottom" >
73 <field name="name"/>84 <field name="name"/>
74 <field name="concept_id"/>85 <field name="concept_id"/>
75 <field name="retencion_islr"/>86 <field name="retencion_islr"/>
@@ -82,14 +93,13 @@
82 <record id="view_islr_line_form" model="ir.ui.view">93 <record id="view_islr_line_form" model="ir.ui.view">
83 <field name="name">islr.wh.doc.line_form</field>94 <field name="name">islr.wh.doc.line_form</field>
84 <field name="model">islr.wh.doc.line</field>95 <field name="model">islr.wh.doc.line</field>
85 <field name="type">form</field>
86 <field name="arch" type="xml">96 <field name="arch" type="xml">
87 <form string="Lines Withholding Income">97 <form string="Lines Income Withholding">
88 <field name="concept_id" colspan='6'/>98 <field name="concept_id" colspan='6'/>
89 <field name="move_id" colspan='6'/>99 <field name="move_id" colspan='6'/>
90 <newline/>100 <newline/>
91 <field name="xml_ids" nolabel="1" colspan='4'>101 <field name="xml_ids" nolabel="1" colspan='4'>
92 <tree string="Detail of the Concept of Withholding Income">102 <tree string="Detail of the Concept of Income Withholding">
93 <field name="rate_id"/>103 <field name="rate_id"/>
94 <field name="wh"/>104 <field name="wh"/>
95 <field name="porcent_rete"/>105 <field name="porcent_rete"/>
@@ -103,9 +113,8 @@
103 <record id="view_islr_tree_customers" model="ir.ui.view">113 <record id="view_islr_tree_customers" model="ir.ui.view">
104 <field name="name">islr.wh.doc_tree_customers</field>114 <field name="name">islr.wh.doc_tree_customers</field>
105 <field name="model">islr.wh.doc</field>115 <field name="model">islr.wh.doc</field>
106 <field name="type">tree</field>
107 <field name="arch" type="xml">116 <field name="arch" type="xml">
108 <tree colors="blue:state=='draft'" string="Customer Withholding Income">117 <tree colors="blue:state=='draft'" string="Customer Income Withholding">
109 <field name="partner_id"/>118 <field name="partner_id"/>
110 <field name="date_ret"/>119 <field name="date_ret"/>
111 <field name="period_id"/>120 <field name="period_id"/>
@@ -122,9 +131,8 @@
122 <record id="view_islr_form_customers" model="ir.ui.view">131 <record id="view_islr_form_customers" model="ir.ui.view">
123 <field name="name">islr.wh.doc_form_customers</field>132 <field name="name">islr.wh.doc_form_customers</field>
124 <field name="model">islr.wh.doc</field>133 <field name="model">islr.wh.doc</field>
125 <field name="type">form</field>
126 <field name="arch" type="xml">134 <field name="arch" type="xml">
127 <form string="Customer Withholding Income">135 <form string="Customer Income Withholding">
128 <group colspan="4" col="6">136 <group colspan="4" col="6">
129 <field name="journal_id" domain="[('type','=','islr_sale')]"/>137 <field name="journal_id" domain="[('type','=','islr_sale')]"/>
130 <field name="type"/>138 <field name="type"/>
@@ -138,10 +146,13 @@
138 <field name="date_uid"/>146 <field name="date_uid"/>
139 </group>147 </group>
140 <notebook colspan="6">148 <notebook colspan="6">
149 <page string="Invoices to Be Withheld">
150 <field name='invoice_ids' nolabel='1'/>
151 </page>
141 <page string="Invoices">152 <page string="Invoices">
142 <field domain="[('partner_id','=',partner_id),('status','=','no_pro'),('state','in',['open','paid']),('type','in',['out_invoice','out_refund'])]" colspan="6" name="islr_wh_doc_id" nolabel="1" widget="many2many"/>153 <field domain="[('partner_id','=',partner_id),('status','=','no_pro'),('state','in',['open','paid']),('type','in',['out_invoice','out_refund'])]" colspan="6" name="islr_wh_doc_id" nolabel="1" widget="many2many"/>
143 </page>154 </page>
144 <page string="Concept of Withholding Income">155 <page string="Concept of Income Withholding">
145 <field colspan="6" name="concept_ids" nolabel="1" widget="one2many_list"/>156 <field colspan="6" name="concept_ids" nolabel="1" widget="one2many_list"/>
146 <group col="4" colspan="2">157 <group col="4" colspan="2">
147 <field name="amount_total_ret"/>158 <field name="amount_total_ret"/>
@@ -154,10 +165,9 @@
154 <group colspan="6" col="2">165 <group colspan="6" col="2">
155 <group col="1">166 <group col="1">
156 <field name="state"/>167 <field name="state"/>
157 <button name="act_progress" string="Progress" states="draft" icon="gtk-go-forward"/>168 <button name="act_confirm" string="Confirmed" states="draft" icon="gtk-go-forward"/>
158 <button name="act_confirmed" string="Confirmed" states="progress" icon="gtk-go-forward"/>
159 <button name="act_done" string="Done" states="confirmed" icon="gtk-execute" />169 <button name="act_done" string="Done" states="confirmed" icon="gtk-execute" />
160 <button name="%(voucher_report_withholding_islr)d" string="Print Withholding Income" states="done" colspan="3" type="action" icon="gtk-execute"/>170 <button name="%(voucher_report_withholding_islr)d" string="Print Income Withholding" states="done" colspan="3" type="action" icon="gtk-execute"/>
161 <button name="act_cancel" string="Cancel" states="draft,progress,confirmed,done" icon="gtk-cancel" />171 <button name="act_cancel" string="Cancel" states="draft,progress,confirmed,done" icon="gtk-cancel" />
162 <button name="act_draft" colspan="2" string="Set to draft" states="cancel" icon="gtk-go-forward"/>172 <button name="act_draft" colspan="2" string="Set to draft" states="cancel" icon="gtk-go-forward"/>
163 </group>173 </group>
@@ -175,14 +185,13 @@
175 <record id="view_wh_islr_filter_suppliers" model="ir.ui.view">185 <record id="view_wh_islr_filter_suppliers" model="ir.ui.view">
176 <field name="name">islr.wh.doc.search</field>186 <field name="name">islr.wh.doc.search</field>
177 <field name="model">islr.wh.doc</field>187 <field name="model">islr.wh.doc</field>
178 <field name="type">search</field>
179 <field name="arch" type="xml">188 <field name="arch" type="xml">
180 <search string="Search Withholding Income">189 <search string="Search Income Withholding">
181 <group col="10" colspan="4">190 <group col="10" colspan="4">
182 <filter name="draft" string="Draft" domain="[('state','=','draft')]" help="Draft Withholding Income"/>191 <filter name="draft" string="Draft" domain="[('state','=','draft')]" help="Draft Income Withholding"/>
183 <filter name="confirmed" string="Confirmed" domain="[('state','=','confirmed')]" help="Confirmed Withholding Income"/>192 <filter name="confirmed" string="Confirmed" domain="[('state','=','confirmed')]" help="Confirmed Income Withholding"/>
184 <filter name="done" string="Done" domain="[('state','=','done')]" help="Done Withholding Income"/>193 <filter name="done" string="Done" domain="[('state','=','done')]" help="Done Income Withholding"/>
185 <filter name="cancel" string="Cancel" domain="[('state','=','cancel')]" help="Cancel Withholding Income"/>194 <filter name="cancel" string="Cancel" domain="[('state','=','cancel')]" help="Cancel Income Withholding"/>
186 </group>195 </group>
187 <newline/>196 <newline/>
188 <group expand="1" string="Group By...">197 <group expand="1" string="Group By...">
@@ -199,9 +208,8 @@
199 <record id="view_wh_islr_tree_suppliers" model="ir.ui.view">208 <record id="view_wh_islr_tree_suppliers" model="ir.ui.view">
200 <field name="name">islr.wh.doc_tree_suppliers</field>209 <field name="name">islr.wh.doc_tree_suppliers</field>
201 <field name="model">islr.wh.doc</field>210 <field name="model">islr.wh.doc</field>
202 <field name="type">tree</field>
203 <field name="arch" type="xml">211 <field name="arch" type="xml">
204 <tree colors="blue:state=='draft'" string="Supplier Withholding Income">212 <tree colors="blue:state=='draft'" string="Supplier Income Withholding">
205 <field name="partner_id"/>213 <field name="partner_id"/>
206 <field name="date_ret"/>214 <field name="date_ret"/>
207 <field name="period_id"/>215 <field name="period_id"/>
@@ -215,49 +223,11 @@
215 </field>223 </field>
216 </record>224 </record>
217225
218 <record id="view_islr_line_tree" model="ir.ui.view">
219 <field name="name">islr.wh.doc_line_tree2</field>
220 <field name="model">islr.wh.doc.line</field>
221 <field name="type">tree</field>
222 <field name="arch" type="xml">
223 <tree string="Lines Withholding Income" editable="bottom" >
224 <field name="name"/>
225 <field name="concept_id"/>
226 <field name="retencion_islr"/>
227 <field name="amount"/>
228 <field name="move_id"/>
229 </tree>
230 </field>
231 </record>
232
233 <record id="view_islr_line_form" model="ir.ui.view">
234 <field name="name">islr.wh.doc.line_form2</field>
235 <field name="model">islr.wh.doc.line</field>
236 <field name="type">form</field>
237 <field name="arch" type="xml">
238 <form string="Lines Withholding Income">
239 <field name="concept_id" colspan='6'/>
240 <field name="move_id" colspan='6'/>
241 <newline/>
242 <field name="xml_ids" nolabel="1" colspan='4'>
243 <tree string="Detail of the Concept of Withholding Income">
244 <field name="rate_id"/>
245 <field name="wh"/>
246 <field name="porcent_rete"/>
247 <field name="base"/>
248 </tree>
249 </field>
250 </form>
251 </field>
252 </record>
253
254
255 <record id="view_wh_islr_form_suppliers" model="ir.ui.view">226 <record id="view_wh_islr_form_suppliers" model="ir.ui.view">
256 <field name="name">islr.wh.doc_form_suppliers</field>227 <field name="name">islr.wh.doc_form_suppliers</field>
257 <field name="model">islr.wh.doc</field>228 <field name="model">islr.wh.doc</field>
258 <field name="type">form</field>
259 <field name="arch" type="xml">229 <field name="arch" type="xml">
260 <form string="Supplier Withholding Income">230 <form string="Supplier Income Withholding">
261 <group colspan="4" col="6">231 <group colspan="4" col="6">
262 <field name="journal_id" domain="[('type','=','islr_purchase')]"/>232 <field name="journal_id" domain="[('type','=','islr_purchase')]"/>
263 <field name="type"/>233 <field name="type"/>
@@ -273,36 +243,60 @@
273 <field name="invoice_id" />243 <field name="invoice_id" />
274 </group>244 </group>
275 <notebook colspan="6">245 <notebook colspan="6">
276 <page string="Invoices">246 <page string="Invoices to Be Withheld">
247 <field name="invoice_ids" nolabel='1'/>
248 </page>
249 <page string="Invoices" invisible='1'>
277 <field domain="[('partner_id','=',partner_id),('status','=','no_pro'),('state','in',['open','paid']),('type','in',['in_invoice','in_refund'])]" colspan="6" name="islr_wh_doc_id" nolabel="1" widget="many2many"/>250 <field domain="[('partner_id','=',partner_id),('status','=','no_pro'),('state','in',['open','paid']),('type','in',['in_invoice','in_refund'])]" colspan="6" name="islr_wh_doc_id" nolabel="1" widget="many2many"/>
278 </page>251 </page>
279 <page string="Concept of Withholding Income">252 <page string="Income Withholding Concepts">
280 <field colspan="6" name="concept_ids" nolabel="1" widget="one2many_list"/>253 <field colspan="6" name="concept_ids" nolabel="1">
281 <group col="4" colspan="2">254 <tree string="Income Withholding Concepts">
282 <field name="amount_total_ret"/>255 <field name="name" invisible='1'/>
283 </group>
284 </page>
285 <page string="Invoices" invisible="1">
286 <field name="invoice_ids" nolabel="1">
287 <tree string="Invoices Withhelds">
288 <field name="invoice_id"/>256 <field name="invoice_id"/>
289 <field name="islr_xml_id"/>257 <field name="concept_id"/>
290 <field name="amount_islr_ret"/>258 <field name="base_amount"/>
291 <field name="base_ret"/>259 <field name="retencion_islr"/>
260 <field name="subtract"/>
261 <field name="amount"/>
262 <field name="move_id"/>
292 </tree>263 </tree>
264 <form string="Income Withholding Concepts">
265 <field name="invoice_id"/>
266 <newline/>
267 <field name="concept_id" colspan='6'/>
268 <newline/>
269 <field name="xml_ids" nolabel="1" colspan='4'>
270 <tree string="Detail of the Concept of Income Withholding">
271 <field name="concept_code"/>
272 <field name="rate_id"/>
273 <field name="wh"/>
274 <field name="porcent_rete"/>
275 <field name="base"/>
276 </tree>
277 </field>
278 <field name="base_amount"/>
279 <field name="subtract"/>
280 <field name="retencion_islr"/>
281 <field name="amount"/>
282 <field name="move_id" colspan='6'/>
283 </form>
293 </field>284 </field>
294 </page>285 </page>
295 <page string="Other Information">286 <page string="Other Information">
296 <field name="company_id"/>287 <field name="company_id"/>
297 </page>288 </page>
298 </notebook>289 </notebook>
290 <group col="4" colspan="2">
291 <field name="amount_total_ret"/>
292 <button colspan="2" name="compute_amount_wh" string="Compute Income Withholding" type="object" icon="terp-stock_format-scientific"/>
293 </group>
299 <group colspan="6" col="2">294 <group colspan="6" col="2">
300 <group col="1">295 <group col="1">
301 <field name="state"/>296 <field name="state"/>
302 <button name="act_progress" string="Progress" states="draft" type="workflow" icon="gtk-go-forward"/>297 <button name="act_confirm" string="Confirm" states="draft" type="workflow" icon="gtk-go-forward"/>
303 <button name="act_confirmed" string="Confirmed" states="progress" type="workflow" icon="gtk-go-forward"/>
304 <button name="act_done" string="Done" states="confirmed" type="workflow" icon="gtk-go-forward"/>298 <button name="act_done" string="Done" states="confirmed" type="workflow" icon="gtk-go-forward"/>
305 <button name="%(voucher_report_withholding_islr)d" string="Print Withholding Income" colspan="3" states="done" type="action" icon="gtk-execute"/>299 <button name="%(voucher_report_withholding_islr)d" string="Print Income Withholding" colspan="3" states="done" type="action" icon="gtk-execute"/>
306 <button name="act_cancel" string="Cancel" states="draft,progress,confirmed,done" type="workflow" icon="gtk-go-forward"/>300 <button name="act_cancel" string="Cancel" states="draft,progress,confirmed,done" type="workflow" icon="gtk-go-forward"/>
307 <button name="act_draft" colspan="2" string="Set to draft" states="cancel" type="workflow" icon="gtk-go-forward"/>301 <button name="act_draft" colspan="2" string="Set to draft" states="cancel" type="workflow" icon="gtk-go-forward"/>
308 </group>302 </group>
@@ -313,7 +307,7 @@
313307
314308
315 <record model="ir.actions.act_window" id="action_wh_islr_customer">309 <record model="ir.actions.act_window" id="action_wh_islr_customer">
316 <field name="name">Customer Withholding Income</field>310 <field name="name">Customer Income Withholding</field>
317 <field name="res_model">islr.wh.doc</field>311 <field name="res_model">islr.wh.doc</field>
318 <field name="type">ir.actions.act_window</field>312 <field name="type">ir.actions.act_window</field>
319 <field name="view_type">form</field>313 <field name="view_type">form</field>
@@ -338,12 +332,12 @@
338332
339 <menuitem333 <menuitem
340 id="menu_action_wh_islr_customer"334 id="menu_action_wh_islr_customer"
341 name="Customer Withholding Income"335 name="Customer Income Withholding"
342 parent="account.menu_finance_receivables"336 parent="account.menu_finance_receivables"
343 action="action_wh_islr_customer"/>337 action="action_wh_islr_customer"/>
344338
345 <record model="ir.actions.act_window" id="action_wh_islr_supplier">339 <record model="ir.actions.act_window" id="action_wh_islr_supplier">
346 <field name="name">Supplier Withholding Income</field>340 <field name="name">Supplier Income Withholding</field>
347 <field name="res_model">islr.wh.doc</field>341 <field name="res_model">islr.wh.doc</field>
348 <field name="type">ir.actions.act_window</field>342 <field name="type">ir.actions.act_window</field>
349 <field name="view_type">form</field>343 <field name="view_type">form</field>
@@ -351,7 +345,7 @@
351 <field name="domain">[('type','=','in_invoice')]</field>345 <field name="domain">[('type','=','in_invoice')]</field>
352 <field name="context">{'type':'in_invoice', 'search_default_draft': 1}</field>346 <field name="context">{'type':'in_invoice', 'search_default_draft': 1}</field>
353 <field name="search_view_id" ref="view_wh_islr_filter_suppliers"/>347 <field name="search_view_id" ref="view_wh_islr_filter_suppliers"/>
354 <field name="help">With Supplier Withholding you can manage document withholding issued to your suppliers. OpenERP can Just generate document withholding for purchase process automatically from invoices. To generate the withholding income and all accounting process you must confirm and validate the document withholding.</field>348 <field name="help">With Supplier Withholding you can manage document withholding issued to your suppliers. OpenERP can Just generate document withholding for purchase process automatically from invoices. To generate the Income Withholding and all accounting process you must confirm and validate the document withholding.</field>
355349
356 </record>350 </record>
357 <record model="ir.actions.act_window.view" id="action_wh_islr_tree">351 <record model="ir.actions.act_window.view" id="action_wh_islr_tree">
@@ -369,7 +363,7 @@
369363
370 <menuitem364 <menuitem
371 id="menu_action_wh_islr_supplier"365 id="menu_action_wh_islr_supplier"
372 name="Supplier Withholding Income" 366 name="Supplier Income Withholding"
373 parent="account.menu_finance_payables"367 parent="account.menu_finance_payables"
374 action="action_wh_islr_supplier"/>368 action="action_wh_islr_supplier"/>
375369
376370
=== modified file 'l10n_ve_withholding_islr/view/islr_xml_wh.xml'
--- l10n_ve_withholding_islr/view/islr_xml_wh.xml 2012-12-17 23:45:56 +0000
+++ l10n_ve_withholding_islr/view/islr_xml_wh.xml 2013-01-14 19:15:27 +0000
@@ -11,7 +11,6 @@
11 <record id="view_xml_islr_line_form" model="ir.ui.view">11 <record id="view_xml_islr_line_form" model="ir.ui.view">
12 <field name="name">islr.xml.wh.line_form</field>12 <field name="name">islr.xml.wh.line_form</field>
13 <field name="model">islr.xml.wh.line</field>13 <field name="model">islr.xml.wh.line</field>
14 <field name="type">form</field>
15 <field name="arch" type="xml">14 <field name="arch" type="xml">
16 <form string="Export in XML data">15 <form string="Export in XML data">
17 <newline/>16 <newline/>
@@ -22,7 +21,7 @@
22 <field name="partner_vat"/>21 <field name="partner_vat"/>
23 </group>22 </group>
24 <newline/>23 <newline/>
25 <separator string="Concept of Withholding Income" colspan="6"/>24 <separator string="Concept of Income Withholding" colspan="6"/>
26 <newline/>25 <newline/>
27 <group col="4" colspan="4">26 <group col="4" colspan="4">
28 <field name="concept_id" colspan="4" />27 <field name="concept_id" colspan="4" />
@@ -54,7 +53,6 @@
54 <record id="view_xml_islr_tree" model="ir.ui.view">53 <record id="view_xml_islr_tree" model="ir.ui.view">
55 <field name="name">islr.xml.wh.doc_tree</field>54 <field name="name">islr.xml.wh.doc_tree</field>
56 <field name="model">islr.xml.wh.doc</field>55 <field name="model">islr.xml.wh.doc</field>
57 <field name="type">tree</field>
58 <field name="arch" type="xml">56 <field name="arch" type="xml">
59 <tree string="Lines Withholding for XML" >57 <tree string="Lines Withholding for XML" >
60 <field name="name"/>58 <field name="name"/>
@@ -67,7 +65,6 @@
67 <record id="view_xml_islr_form" model="ir.ui.view">65 <record id="view_xml_islr_form" model="ir.ui.view">
68 <field name="name">islr.xml.wh.doc_form</field>66 <field name="name">islr.xml.wh.doc_form</field>
69 <field name="model">islr.xml.wh.doc</field>67 <field name="model">islr.xml.wh.doc</field>
70 <field name="type">form</field>
71 <field name="arch" type="xml">68 <field name="arch" type="xml">
72 <form string="Lines Withholding for XML">69 <form string="Lines Withholding for XML">
73 <field name="name"/>70 <field name="name"/>
@@ -107,7 +104,6 @@
107 <record id="view_generate_xml_filter" model="ir.ui.view">104 <record id="view_generate_xml_filter" model="ir.ui.view">
108 <field name="name">islr.xml.wh.doc.search</field>105 <field name="name">islr.xml.wh.doc.search</field>
109 <field name="model">islr.xml.wh.doc</field>106 <field name="model">islr.xml.wh.doc</field>
110 <field name="type">search</field>
111 <field name="arch" type="xml">107 <field name="arch" type="xml">
112 <search string="Search File XML">108 <search string="Search File XML">
113 <group col="10" colspan="4">109 <group col="10" colspan="4">
@@ -118,7 +114,7 @@
118 <separator orientation="vertical"/>114 <separator orientation="vertical"/>
119 <field name="company_id"/>115 <field name="company_id"/>
120 <field name="user_id" select="1" widget="selection" string="Salesman">116 <field name="user_id" select="1" widget="selection" string="Salesman">
121 <filter domain="[('user_id','=',uid)]" help="My Withholding Income" icon="terp-personal" separator="1"/>117 <filter domain="[('user_id','=',uid)]" help="My Income Withholding" icon="terp-personal" separator="1"/>
122 </field>118 </field>
123 </group>119 </group>
124 <newline/>120 <newline/>
125121
=== modified file 'l10n_ve_withholding_islr/view/partner_view.xml'
--- l10n_ve_withholding_islr/view/partner_view.xml 2012-10-02 18:30:33 +0000
+++ l10n_ve_withholding_islr/view/partner_view.xml 2013-01-14 19:15:27 +0000
@@ -11,7 +11,6 @@
11 <record id="res_partner_wh_islr" model="ir.ui.view">11 <record id="res_partner_wh_islr" model="ir.ui.view">
12 <field name="name">res.partner.wh.islr</field>12 <field name="name">res.partner.wh.islr</field>
13 <field name="model">res.partner</field>13 <field name="model">res.partner</field>
14 <field name="type">form</field>
15 <field name="inherit_id" ref="l10n_ve_withholding.wh_partner"/>14 <field name="inherit_id" ref="l10n_ve_withholding.wh_partner"/>
16 <field name="arch" type="xml">15 <field name="arch" type="xml">
17 <xpath expr="//separator[@string='vsep']" position="after">16 <xpath expr="//separator[@string='vsep']" position="after">
1817
=== modified file 'l10n_ve_withholding_islr/view/product_view.xml'
--- l10n_ve_withholding_islr/view/product_view.xml 2012-11-07 21:33:58 +0000
+++ l10n_ve_withholding_islr/view/product_view.xml 2013-01-14 19:15:27 +0000
@@ -5,12 +5,11 @@
5 <record model="ir.ui.view" id="view_product_product_islr">5 <record model="ir.ui.view" id="view_product_product_islr">
6 <field name="name">product.product.form.islr</field>6 <field name="name">product.product.form.islr</field>
7 <field name="model">product.product</field>7 <field name="model">product.product</field>
8 <field name="type">form</field>
9 <field name="inherit_id" ref="account.product_normal_form_view"/>8 <field name="inherit_id" ref="account.product_normal_form_view"/>
10 <field name="arch" type="xml">9 <field name="arch" type="xml">
11 <xpath expr="//group[@name='properties']" position="after">10 <xpath expr="//group[@name='properties']" position="after">
12 <newline/>11 <newline/>
13 <separator string="Concept of Withholding Income"/>12 <separator string="Concept of Income Withholding"/>
14 <newline/>13 <newline/>
15 <group col='6' colspan='6' >14 <group col='6' colspan='6' >
16 <field name="concept_id"/>15 <field name="concept_id"/>
@@ -30,7 +29,6 @@
30 <record id="product_normal_form_view_type" model="ir.ui.view">29 <record id="product_normal_form_view_type" model="ir.ui.view">
31 <field name="name">product.normal.form.type</field>30 <field name="name">product.normal.form.type</field>
32 <field name="model">product.product</field>31 <field name="model">product.product</field>
33 <field name="type">form</field>
34 <field name="inherit_id" ref="product.product_normal_form_view"/>32 <field name="inherit_id" ref="product.product_normal_form_view"/>
35 <field name="arch" type="xml">33 <field name="arch" type="xml">
36 <xpath expr="//field[@name='type']" position="replace">34 <xpath expr="//field[@name='type']" position="replace">
3735
=== modified file 'l10n_ve_withholding_islr/view/wh_islr_view.xml'
--- l10n_ve_withholding_islr/view/wh_islr_view.xml 2011-10-25 20:33:16 +0000
+++ l10n_ve_withholding_islr/view/wh_islr_view.xml 2013-01-14 19:15:27 +0000
@@ -2,7 +2,7 @@
2<openerp>2<openerp>
3 <data>3 <data>
44
5 <menuitem id="menu_wh_configuration_islr" name="Withholding Income" parent="l10n_ve_withholding.menu_wh_configuration"/>5 <menuitem id="menu_wh_configuration_islr" name="Income Withholding" parent="l10n_ve_withholding.menu_wh_configuration"/>
66
7 </data>7 </data>
8</openerp>8</openerp>
99
=== modified file 'l10n_ve_withholding_islr/workflow/account_workflow.xml'
--- l10n_ve_withholding_islr/workflow/account_workflow.xml 2012-12-18 13:37:25 +0000
+++ l10n_ve_withholding_islr/workflow/account_workflow.xml 2013-01-14 19:15:27 +0000
@@ -15,7 +15,7 @@
15 <field name="name">Withholding Islr</field>15 <field name="name">Withholding Islr</field>
16 <field name="kind">subflow</field>16 <field name="kind">subflow</field>
17 <field name="subflow_id" ref="wh_islr_order"/>17 <field name="subflow_id" ref="wh_islr_order"/>
18 <field name="action">action_ret_islr()</field>18 <field name="action">_create_islr_wh_doc()</field>
19 </record>19 </record>
2020
21 <record id="act_islr_router" model="workflow.activity">21 <record id="act_islr_router" model="workflow.activity">
@@ -39,8 +39,8 @@
39 -->39 -->
40 <record id="trans_wh_router_wh_islr" model="workflow.transition">40 <record id="trans_wh_router_wh_islr" model="workflow.transition">
41 <field name="act_from" ref="l10n_ve_withholding.act_wh_router"/>41 <field name="act_from" ref="l10n_ve_withholding.act_wh_router"/>
42 <field name="act_to" ref="act_islr_router"/>42 <field name="act_to" ref="act_withold_islr"/>
43 <field name="condition">check_invoice_type()</field>43 <field name="condition">check_invoice_type() and check_withholdable_concept()</field>
44 <field name="signal"></field>44 <field name="signal"></field>
45 </record>45 </record>
46 46
4747
=== modified file 'l10n_ve_withholding_islr/workflow/islr_wh_workflow.xml'
--- l10n_ve_withholding_islr/workflow/islr_wh_workflow.xml 2012-05-04 14:44:55 +0000
+++ l10n_ve_withholding_islr/workflow/islr_wh_workflow.xml 2013-01-14 19:15:27 +0000
@@ -24,8 +24,7 @@
2424
25 <record id="act_confirmed" model="workflow.activity">25 <record id="act_confirmed" model="workflow.activity">
26 <field name="wkf_id" ref="wh_islr_order"/>26 <field name="wkf_id" ref="wh_islr_order"/>
27 <field name="action">action_number()27 <field name="action">action_confirm()</field>
28write({'state':'confirmed'})</field>
29 <field name="kind">function</field>28 <field name="kind">function</field>
30 <field name="name">confirmed</field>29 <field name="name">confirmed</field>
31 </record>30 </record>
@@ -34,7 +33,8 @@
34 <field name="wkf_id" ref="wh_islr_order"/>33 <field name="wkf_id" ref="wh_islr_order"/>
35 <field name="kind">function</field>34 <field name="kind">function</field>
36 <field name="name">done</field>35 <field name="name">done</field>
37 <field name="action">action_move_create()36 <field name="action">action_number()
37action_move_create()
38write({'state':'done'})</field>38write({'state':'done'})</field>
39 </record>39 </record>
40 40
@@ -63,7 +63,8 @@
63 <record id="trans_draft_confirmed" model="workflow.transition">63 <record id="trans_draft_confirmed" model="workflow.transition">
64 <field name="act_from" ref="act_draft"/>64 <field name="act_from" ref="act_draft"/>
65 <field name="act_to" ref="act_confirmed"/>65 <field name="act_to" ref="act_confirmed"/>
66 <field name="condition">validate(type,concept_ids,invoice_ids)</field>66 <field name="condition">check_income_wh()</field>
67 <field name="signal">act_confirm</field>
67 </record>68 </record>
68 69
69 <record id="trans_draft_progress" model="workflow.transition">70 <record id="trans_draft_progress" model="workflow.transition">
@@ -82,7 +83,8 @@
82 <record id="trans_progress_confirmed" model="workflow.transition">83 <record id="trans_progress_confirmed" model="workflow.transition">
83 <field name="act_from" ref="act_progress"/>84 <field name="act_from" ref="act_progress"/>
84 <field name="act_to" ref="act_confirmed"/>85 <field name="act_to" ref="act_confirmed"/>
85 <field name="signal">act_confirmed</field>86 <field name="condition">True</field>
87 <field name="signal"></field>
86 </record>88 </record>
8789
88 <record id="trans_confirmed_cancel" model="workflow.transition">90 <record id="trans_confirmed_cancel" model="workflow.transition">
8991
=== modified file 'l10n_ve_withholding_iva/model/__init__.py'
--- l10n_ve_withholding_iva/model/__init__.py 2012-11-07 21:33:58 +0000
+++ l10n_ve_withholding_iva/model/__init__.py 2013-01-14 19:15:27 +0000
@@ -29,6 +29,5 @@
29import generate_txt29import generate_txt
30import report30import report
31import installer31import installer
32import wizard
3332
34# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:33# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
3534
=== modified file 'l10n_ve_withholding_src/__init__.py'
--- l10n_ve_withholding_src/__init__.py 2012-02-20 20:11:16 +0000
+++ l10n_ve_withholding_src/__init__.py 2013-01-14 19:15:27 +0000
@@ -24,4 +24,6 @@
24################################################################################24################################################################################
2525
26import model26import model
27import wizard
27import report28import report
29
2830
=== modified file 'l10n_ve_withholding_src/__openerp__.py'
--- l10n_ve_withholding_src/__openerp__.py 2012-08-22 22:56:20 +0000
+++ l10n_ve_withholding_src/__openerp__.py 2013-01-14 19:15:27 +0000
@@ -54,12 +54,15 @@
54 "update_xml" : [54 "update_xml" : [
55 'security/wh_src_security.xml',55 'security/wh_src_security.xml',
56 'security/ir.model.access.csv',56 'security/ir.model.access.csv',
57 'wizard/wizard_retention_view.xml',
57 'view/wh_src_view.xml',58 'view/wh_src_view.xml',
58 'view/account_invoice_view.xml',59 'view/account_invoice_view.xml',
59 'view/company_view.xml',60 'view/company_view.xml',
61 'view/partner_view.xml',
60 'workflow/l10n_ve_wh_src_wf.xml',62 'workflow/l10n_ve_wh_src_wf.xml',
61 'data/data.xml',63 'data/data.xml',
62 'wh_src_report.xml',64 'report/wh_src_report.xml',
65
63 ],66 ],
64 "active": False,67 "active": False,
65 "installable": True68 "installable": True
6669
=== modified file 'l10n_ve_withholding_src/data/data.xml'
--- l10n_ve_withholding_src/data/data.xml 2012-09-11 00:38:30 +0000
+++ l10n_ve_withholding_src/data/data.xml 2013-01-14 19:15:27 +0000
@@ -2,17 +2,32 @@
2<openerp>2<openerp>
3 <data noupdate="1">3 <data noupdate="1">
44
5 <!-- Sequence types for account.wh.src -->
5 <record id="seq_type_account_wh_iva" model="ir.sequence.type">6 <record id="seq_type_account_wh_iva" model="ir.sequence.type">
6 <field name="name">Withholding src costumer</field>7 <field name="name">Withholding src costumer</field>
7 <field name="code">wh.src.out</field>8 <field name="code">wh.src.out</field>
8 </record>9 </record>
910
10 <record id="seq_type_account_wh_iva_purchase" model="ir.sequence.type">11 <record id="seq_type_account_wh_iva_purchase" model="ir.sequence.type">
11 <field name="name">Withholding src supplier</field>12 <field name="name">Withholding src supplier</field>
12 <field name="code">wh.src.in</field>13 <field name="code">wh.src.in</field>
13 </record>14 </record>
14 15
15 <record id="seq_type_account_wh_src_supplier" model="ir.sequence">16 <record id="seq_type_account_wh_src_supplier" model="ir.sequence.type">
17 <field name="name">Withholding local.supplier</field>
18 <field name="code">account.wh.src.in_invoice</field>
19 </record>
20
21 <!-- Sequences for account.wh.src -->
22 <record id="seq_account_retencion_src_customer" model="ir.sequence">
23 <field name="name">Withholding local customer</field>
24 <field name="code">account.wh.src.in_invoice</field>
25 <field name="prefix">RET-SRC</field>
26 <field name="padding">8</field>
27 <field name="number_increment">1</field>
28 </record>
29
30 <record id="seq_account_wh_src_supplier" model="ir.sequence">
16 <field name="name">Withholding src</field>31 <field name="name">Withholding src</field>
17 <field name="code">wh.src.out</field>32 <field name="code">wh.src.out</field>
18 <field name="prefix">src:</field>33 <field name="prefix">src:</field>
@@ -20,48 +35,28 @@
20 <field name="number_increment">1</field>35 <field name="number_increment">1</field>
21 </record>36 </record>
2237
23 <record id="seq_account_retencion_src_customer" model="ir.sequence">38 <record id="seq_account_retencion_src_purchase" model="ir.sequence">
24 <field name="name">Withholding src purchase</field>39 <field name="name">Withholding src purchase</field>
25 <field name="code">wh.src.in</field>40 <field name="code">wh.src.in</field>
26 <field name="prefix">%(year)s-%(month)s-</field>41 <field name="prefix">%(year)s-%(month)s-</field>
27 <field name="padding">8</field>42 <field name="padding">8</field>
28 <field name="number_increment">1</field>43 <field name="number_increment">1</field>
29 </record>44 </record>
45
46 <!-- Journals for account.wh.src -->
30 <record id="withholding_scr_purchase_journal" model="account.journal">47 <record id="withholding_scr_purchase_journal" model="account.journal">
31 <field name="name">DIARIO DE SRC PARA PROVEEDORES</field>48 <field name="name">DIARIO DE SRC PARA PROVEEDORES</field>
32 <field name="code">srcP</field>49 <field name="code">srcP</field>
33 <field name="type">src_purchase</field>50 <field name="type">src_purchase</field>
34 <field name="view_id" ref="account.account_journal_view"/>51 <field name="sequence_id" ref="seq_account_wh_src_supplier"/>
35 <field name="sequence_id" ref="seq_type_account_wh_src_supplier"/>
36 </record>52 </record>
37 53
38 <record id="withholding_src_sale_journal" model="account.journal">54 <record id="withholding_src_sale_journal" model="account.journal">
39 <field name="name">DIARIO DE SRC PARA CLIENTES</field>55 <field name="name">DIARIO DE SRC PARA CLIENTES</field>
40 <field name="code">srcC</field>56 <field name="code">srcC</field>
41 <field name="type">src_sale</field>57 <field name="type">src_sale</field>
42 <field name="view_id" ref="account.account_journal_view"/>
43 <field name="sequence_id" ref="seq_account_retencion_src_customer"/>58 <field name="sequence_id" ref="seq_account_retencion_src_customer"/>
44 </record>59 </record>
45
46 <!-- Sequences type for account.wh.src -->
47
48
49 <record id="seq_type_account_wh_src_supplier" model="ir.sequence.type">
50 <field name="name">Withholding local.supplier</field>
51 <field name="code">account.wh.src.in_invoice</field>
52 </record>
53
54 <!-- Sequences for account.wh.src -->
55
56
57 <record id="seq_account_retencion_src_customer" model="ir.sequence">
58 <field name="name">Withholding local customer</field>
59 <field name="code">account.wh.src.in_invoice</field>
60 <field name="prefix">RET-SRC</field>
61 <field name="padding">8</field>
62 <field name="number_increment">1</field>
63 </record>
64
65 60
66 </data>61 </data>
67</openerp>62</openerp>
6863
=== modified file 'l10n_ve_withholding_src/model/__init__.py'
--- l10n_ve_withholding_src/model/__init__.py 2012-01-27 05:37:46 +0000
+++ l10n_ve_withholding_src/model/__init__.py 2013-01-14 19:15:27 +0000
@@ -26,4 +26,5 @@
26import wh_src26import wh_src
27import invoice27import invoice
28import res_company28import res_company
29import partner
2930
3031
=== modified file 'l10n_ve_withholding_src/model/invoice.py'
--- l10n_ve_withholding_src/model/invoice.py 2012-01-27 05:37:46 +0000
+++ l10n_ve_withholding_src/model/invoice.py 2013-01-14 19:15:27 +0000
@@ -30,6 +30,23 @@
3030
31class account_invoice(osv.osv):31class account_invoice(osv.osv):
32 _inherit = 'account.invoice'32 _inherit = 'account.invoice'
33
34 def onchange_partner_id(self, cr, uid, ids, type, partner_id,\
35 date_invoice=False, payment_term=False, partner_bank_id=False, company_id=False):
36
37 p = self.pool.get('res.partner').browse(cr, uid, partner_id)
38 c = self.pool.get('res.partner').browse(cr, uid, uid)
39 res = super(account_invoice,self).onchange_partner_id(cr, uid, ids, type, \
40 partner_id, date_invoice,payment_term,partner_bank_id,company_id)
41
42 if p.wh_src_agent and type in ('out_invoice') and not p.supplier:
43 res['value']['wh_src_rate'] = p.wh_src_rate
44 elif c.wh_src_agent and type in ('in_invoice') and p.supplier:
45 res['value']['wh_src_rate'] = c.wh_src_rate
46 else:
47 res['value']['wh_src_rate'] = 0
48
49 return res
33 50
34 def _retenida(self, cr, uid, ids, name, args, context):51 def _retenida(self, cr, uid, ids, name, args, context):
35 res = {}52 res = {}
@@ -66,6 +83,20 @@
66 invoice_ids = self.pool.get('account.invoice').search(cr, uid, [('move_id','in',move.keys())], context=context)83 invoice_ids = self.pool.get('account.invoice').search(cr, uid, [('move_id','in',move.keys())], context=context)
67 return invoice_ids84 return invoice_ids
68 85
86 def _check_retention(self, cr, uid, ids, context=None):
87 '''This method will check the retention value will be maximum 5%
88 '''
89 if context is None: context = {}
90
91 invoice_brw = self.browse(cr, uid,ids)
92
93 ret = invoice_brw[0].wh_src_rate
94
95 if ret and ret > 5:
96 return False
97
98 return True
99
69 _columns = {100 _columns = {
70 'wh_src': fields.boolean('Social Responsibility Commitment Withheld'),101 'wh_src': fields.boolean('Social Responsibility Commitment Withheld'),
71 'wh_src_rate': fields.float('SRC Wh rate', digits_compute= dp.get_precision('Withhold'), readonly=True, states={'draft':[('readonly',False)]}, help="Social Responsibility Commitment Withholding Rate"),102 'wh_src_rate': fields.float('SRC Wh rate', digits_compute= dp.get_precision('Withhold'), readonly=True, states={'draft':[('readonly',False)]}, help="Social Responsibility Commitment Withholding Rate"),
@@ -75,6 +106,10 @@
75 'wh_src': False,106 'wh_src': False,
76 }107 }
77108
109 _constraints = [
110 (_check_retention, _("Error ! Maximum retention is 5%"), []),
111 ]
112
78 def _get_move_lines(self, cr, uid, ids, to_wh, period_id, 113 def _get_move_lines(self, cr, uid, ids, to_wh, period_id,
79 pay_journal_id, writeoff_acc_id, 114 pay_journal_id, writeoff_acc_id,
80 writeoff_period_id, writeoff_journal_id, date, 115 writeoff_period_id, writeoff_journal_id, date,
@@ -84,7 +119,7 @@
84 pay_journal_id, writeoff_acc_id, 119 pay_journal_id, writeoff_acc_id,
85 writeoff_period_id, writeoff_journal_id, date, 120 writeoff_period_id, writeoff_journal_id, date,
86 name, context=context)121 name, context=context)
87 if context.get('src_wh',False):122 if context.get('wh_src',False):
88 invoice = self.browse(cr, uid, ids[0])123 invoice = self.browse(cr, uid, ids[0])
89 124
90 types = {'out_invoice': -1, 'in_invoice': 1, 'out_refund': 1, 'in_refund': -1}125 types = {'out_invoice': -1, 'in_invoice': 1, 'out_refund': 1, 'in_refund': -1}
91126
=== modified file 'l10n_ve_withholding_src/model/partner.py'
--- l10n_ve_withholding_src/model/partner.py 2012-01-26 22:29:50 +0000
+++ l10n_ve_withholding_src/model/partner.py 2013-01-14 19:15:27 +0000
@@ -31,14 +31,12 @@
3131
32class res_partner(osv.osv):32class res_partner(osv.osv):
33 _inherit = 'res.partner'33 _inherit = 'res.partner'
34 #~ logger = netsvc.Logger()34 logger = netsvc.Logger()
35 #~ _columns = {35 _columns = {
36 #~ 'wh_src_agent': fields.boolean('Wh. Agent', help="Indicate if the partner is a withholding vat agent"),36 'wh_src_agent': fields.boolean('Wh. Agent', help="Indicate if the partner is a withholding vat agent"),
37 #~ 'wh_src_rate': fields.float(string='Rate', digits_compute= dp.get_precision('Withhold'), help="Withholding vat rate"),37 'wh_src_rate': fields.float(string='Rate', digits_compute= dp.get_precision('Withhold'), help="Withholding vat rate"),
38 #~ }38 }
39 #~ _defaults = {39 _defaults = {
40 #~ 'wh_src_rate': lambda *a: 0,40 'wh_src_rate': lambda *a: 0,
41 #~ }41 }
42
43
44res_partner()42res_partner()
4543
=== modified file 'l10n_ve_withholding_src/model/wh_src.py'
--- l10n_ve_withholding_src/model/wh_src.py 2012-09-26 22:10:42 +0000
+++ l10n_ve_withholding_src/model/wh_src.py 2013-01-14 19:15:27 +0000
@@ -51,6 +51,45 @@
51 res.append((move.id, name))51 res.append((move.id, name))
52 return res52 return res
5353
54 def _get_uid_wh_agent(self, cr, uid, context=None):
55 context = context or {}
56 user_wh_agent = self.pool.get('res.partner').browse(cr, uid, uid, context=context).wh_src_agent
57 return user_wh_agent
58
59 def _get_partner_agent(self, cr, uid, context=None):
60 context = context or {}
61
62 obj_partner = self.pool.get('res.partner')
63
64 if context.get('type') in ('out_invoice'):
65 partner_ids = obj_partner.search(cr, uid, [('wh_src_agent','=',True)])
66 partner_brw = self.pool.get('res.partner').browse(cr, uid, partner_ids, context=context)
67 else:
68 partner_ids = obj_partner.search(cr, uid, [])
69 partner_brw = self.pool.get('res.partner').browse(cr, uid, partner_ids, context=context)
70
71 l = map(lambda x: x.id, partner_brw)
72
73 return l
74
75 def default_get(self, cr, uid, fields, context=None):
76 context = context or {}
77 res = super(account_wh_src, self).default_get(cr, uid, fields, context=context)
78 res.update({'uid_wh_agent': self._get_uid_wh_agent(cr,uid,context=context) })
79 res.update({'partner_list': self._get_partner_agent(cr,uid,context=context) })
80
81 return res
82
83 def _get_p_agent(self, cr, uid, ids, field_name, args, context=None):
84 context = context or {}
85 res= {}.fromkeys(ids,self._get_partner_agent(cr,uid,context=context))
86 return res
87
88 def _get_wh_agent(self, cr, uid, ids, field_name, args, context=None):
89 context = context or {}
90 res= {}.fromkeys(ids,self._get_uid_wh_agent(cr,uid,context=context))
91 return res
92
54 _name = "account.wh.src"93 _name = "account.wh.src"
55 _description = "Social Responsibility Commitment Withholding"94 _description = "Social Responsibility Commitment Withholding"
56 _columns = {95 _columns = {
@@ -77,7 +116,9 @@
77 'company_id': fields.many2one('res.company', 'Company', required=True, help="Company"),116 'company_id': fields.many2one('res.company', 'Company', required=True, help="Company"),
78 'line_ids': fields.one2many('account.wh.src.line', 'wh_id', 'Local withholding lines', readonly=True, states={'draft':[('readonly',False)]}, help="Facturas a la cual se realizarĂ¡n las retenciones"),117 'line_ids': fields.one2many('account.wh.src.line', 'wh_id', 'Local withholding lines', readonly=True, states={'draft':[('readonly',False)]}, help="Facturas a la cual se realizarĂ¡n las retenciones"),
79 'wh_amount': fields.float('Amount', required=False, digits_compute= dp.get_precision('Withhold'), help="Amount withheld"),118 'wh_amount': fields.float('Amount', required=False, digits_compute= dp.get_precision('Withhold'), help="Amount withheld"),
80 119
120 'uid_wh_agent': fields.function(_get_wh_agent, type='boolean', string="uid_wh_agent", store=False),
121 'partner_list' : fields.function(_get_p_agent, type='char', string='Lista', store=False, method=False),
81122
82 } 123 }
83 124
@@ -208,7 +249,7 @@
208 inv_obj = self.pool.get('account.invoice')249 inv_obj = self.pool.get('account.invoice')
209 if context is None: context = {}250 if context is None: context = {}
210 251
211 context.update({'src_wh':True})252 context.update({'wh_src':True})
212 253
213 ret = self.browse(cr, uid, ids[0], context)254 ret = self.browse(cr, uid, ids[0], context)
214255
215256
=== renamed file 'l10n_ve_withholding_src/wh_src_report.xml' => 'l10n_ve_withholding_src/report/wh_src_report.xml'
=== modified file 'l10n_ve_withholding_src/security/ir.model.access.csv'
--- l10n_ve_withholding_src/security/ir.model.access.csv 2012-04-03 19:54:22 +0000
+++ l10n_ve_withholding_src/security/ir.model.access.csv 2013-01-14 19:15:27 +0000
@@ -3,3 +3,4 @@
3"access_account_wh_src_line_user","account.wh.src.line.user","model_account_wh_src_line","l10n_ve_withholding_src.group_account_wh_src_user",1,0,0,03"access_account_wh_src_line_user","account.wh.src.line.user","model_account_wh_src_line","l10n_ve_withholding_src.group_account_wh_src_user",1,0,0,0
4"access_account_wh_src_manager","account.wh.src.manager","model_account_wh_src","l10n_ve_withholding_src.group_account_wh_src_manager",1,1,1,14"access_account_wh_src_manager","account.wh.src.manager","model_account_wh_src","l10n_ve_withholding_src.group_account_wh_src_manager",1,1,1,1
5"access_account_wh_src_line_manager","account.wh.src.line.manager","model_account_wh_src_line","l10n_ve_withholding_src.group_account_wh_src_manager",1,1,1,15"access_account_wh_src_line_manager","account.wh.src.line.manager","model_account_wh_src_line","l10n_ve_withholding_src.group_account_wh_src_manager",1,1,1,1
6"access_wiz_retention","wiz.retention.manager","model_wiz_retention","l10n_ve_withholding_src.group_account_wh_src_manager",1,1,1,1
67
=== modified file 'l10n_ve_withholding_src/view/account_invoice_view.xml'
--- l10n_ve_withholding_src/view/account_invoice_view.xml 2012-11-07 21:33:58 +0000
+++ l10n_ve_withholding_src/view/account_invoice_view.xml 2013-01-14 19:15:27 +0000
@@ -8,14 +8,20 @@
8 <field name="type">form</field>8 <field name="type">form</field>
9 <field name="inherit_id" ref="l10n_ve_withholding.wh_inv_customer"/>9 <field name="inherit_id" ref="l10n_ve_withholding.wh_inv_customer"/>
10 <field name="arch" type="xml">10 <field name="arch" type="xml">
11 <xpath expr="//field[@name='currency_id']" position="after">11 <xpath expr="//separator[@string='rsep']" position="after">
12 <newline/>12 <newline/>
13 <group col="6" colspan="4">13 <group col="6" colspan="4">
14 <field name="wh_src_rate"/>14 <field name="wh_src_rate"/>
15 <field name="wh_src_id"/>15 <field name="wh_src_id"/>
16 </group>16 </group>
17 <button name="%(action_wiz_retention)d"
18 type='action'
19 string='Change retention'
20 icon="gtk-execute"
21 colspan="6"
22 attrs="{'invisible': ['|',('state','=', 'draft'),('state','=', 'paid')]}"/>
17 </xpath>23 </xpath>
18 <xpath expr="//field[@name='account_id']" position='attributes'>24 <xpath expr="//separator[@string='rsep']" position='attributes'>
19 <attribute name="string">SRC Withholdings</attribute>25 <attribute name="string">SRC Withholdings</attribute>
20 </xpath>26 </xpath>
21 </field>27 </field>
@@ -33,7 +39,14 @@
33 <field name="wh_src_rate"/>39 <field name="wh_src_rate"/>
34 <field name="wh_src_id"/>40 <field name="wh_src_id"/>
35 </group>41 </group>
42 <button name="%(action_wiz_retention)d"
43 type='action'
44 string='Change retention'
45 icon="gtk-execute"
46 colspan="6"
47 attrs="{'invisible': ['|',('state','=', 'draft'),('state','=', 'paid')]}"/>
36 </xpath>48 </xpath>
49
37 <xpath expr='//separator[@string="rsep"]' position='attributes'>50 <xpath expr='//separator[@string="rsep"]' position='attributes'>
38 <attribute name="string">SRC Withholdings</attribute>51 <attribute name="string">SRC Withholdings</attribute>
39 </xpath>52 </xpath>
4053
=== modified file 'l10n_ve_withholding_src/view/company_view.xml'
--- l10n_ve_withholding_src/view/company_view.xml 2012-01-27 05:37:46 +0000
+++ l10n_ve_withholding_src/view/company_view.xml 2013-01-14 19:15:27 +0000
@@ -8,12 +8,12 @@
8 <field name="type">form</field>8 <field name="type">form</field>
9 <field name="inherit_id" ref="base.view_company_form"/>9 <field name="inherit_id" ref="base.view_company_form"/>
10 <field name="arch" type="xml">10 <field name="arch" type="xml">
11 <page string="Configuration" position="inside">11 <xpath expr='//page[@string="Configuration"]/group/group[@name="account_grp"]' position="after">
12 <separator string="Social Responsability Commitment Accounts" colspan="4"/>12 <separator string="Social Responsability Commitment Accounts" colspan="2"/>
13 <field name="wh_src_collected_account_id" required='1'/>13 <field name="wh_src_collected_account_id" required='1'/>
14 <field name="wh_src_paid_account_id" required='1'/>14 <field name="wh_src_paid_account_id" required='1'/>
15 <newline/>15 <newline/>
16 </page>16 </xpath>
17 </field>17 </field>
18 </record>18 </record>
1919
2020
=== modified file 'l10n_ve_withholding_src/view/partner_view.xml'
--- l10n_ve_withholding_src/view/partner_view.xml 2012-01-26 04:52:17 +0000
+++ l10n_ve_withholding_src/view/partner_view.xml 2013-01-14 19:15:27 +0000
@@ -1,33 +1,25 @@
1<?xml version="1.0" encoding="utf-8"?>1<?xml version="1.0" encoding="utf-8"?>
2<openerp>2<openerp>
3 <data>3 <data>
44<!--
5
6
7 <!--
8 =====================================================5 =====================================================
9 Partners Extension6 Partners Extension
10 =====================================================7 =====================================================
11 -->8-->
129 <record id="partner_wh_src" model="ir.ui.view">
13 <record id="partner_ext_munici_view_form_loc_ve" model="ir.ui.view">10 <field name="name">res.partner.form.wh.src</field>
14 <field name="name">partner_extended_munici.partner.form.view.loc_ve</field>
15 <field name="model">res.partner</field>11 <field name="model">res.partner</field>
16 <field name="type">form</field>
17 <field name="inherit_id" ref="l10n_ve_withholding.wh_partner"/>12 <field name="inherit_id" ref="l10n_ve_withholding.wh_partner"/>
18 <field name="arch" type="xml">13 <field name="arch" type="xml">
19 <page string="Withholdings" position="inside">14 <xpath expr="//page[@string='Withholdings']" position="after">
20 <notebook>15 <page string="Local Withholdings">
21 <page string="Local Withholdings">16 <group col="4" colspan="2">
22 <group col="4" colspan="2">17 <field name="wh_src_agent"/>
23 <field name="property_wh_munici_payable"/>18 <field name="wh_src_rate"/>
24 <field name="property_wh_munici_receivable"/>19 </group>
25 </group>20 </page>
26 </page>21 </xpath>
27 </notebook>
28 </page>
29 </field>22 </field>
30 </record>23 </record>
31
32 </data>24 </data>
33</openerp>25</openerp>
3426
=== modified file 'l10n_ve_withholding_src/view/wh_src_view.xml'
--- l10n_ve_withholding_src/view/wh_src_view.xml 2012-01-30 20:48:44 +0000
+++ l10n_ve_withholding_src/view/wh_src_view.xml 2013-01-14 19:15:27 +0000
@@ -57,10 +57,10 @@
57 <field name="arch" type="xml">57 <field name="arch" type="xml">
58 <search string="Search Withholding Local">58 <search string="Search Withholding Local">
59 <group col="10" colspan="4">59 <group col="10" colspan="4">
60 <filter name="wh_src_draft" icon="terp-gtk-media-pause" string="Draft" domain="[('state','=','draft')]" help="Draft Withholding Local"/>60 <filter name="wh_src_draft" string="Draft" domain="[('state','=','draft')]" help="Draft Withholding Local"/>
61 <filter name="wh_src_confirmed" icon="terp-gtk-media-pause" string="Confirmed" domain="[('state','=','confirmed')]" help="Draft Withholding Local"/>61 <filter name="wh_src_confirmed" string="Confirmed" domain="[('state','=','confirmed')]" help="Draft Withholding Local"/>
62 <filter name="wh_src_done" icon="terp-check" string="Done" domain="[('state','=','done')]" help="Done Withholding Local"/>62 <filter name="wh_src_done" string="Done" domain="[('state','=','done')]" help="Done Withholding Local"/>
63 <filter name="wh_src_cancel" icon="terp-dialog-close" string="Cancel" domain="[('state','=','cancel')]" help="Cancel Withholding Local"/>63 <filter name="wh_src_cancel" string="Cancel" domain="[('state','=','cancel')]" help="Cancel Withholding Local"/>
64 <separator orientation="vertical"/>64 <separator orientation="vertical"/>
65 <field name="code"/>65 <field name="code"/>
66 <field name="number"/>66 <field name="number"/>
@@ -70,11 +70,11 @@
70 </group>70 </group>
71 <newline/>71 <newline/>
72 <group expand="1" string="Group By...">72 <group expand="1" string="Group By...">
73 <filter string="Partner" icon="terp-partner" domain="[]" context="{'group_by':'partner_id'}"/>73 <filter string="Partner" domain="[]" context="{'group_by':'partner_id'}"/>
74 <separator orientation="vertical"/>74 <separator orientation="vertical"/>
75 <filter string="State" icon="terp-stock_effects-object-colorize" domain="[]" context="{'group_by':'state'}"/>75 <filter string="State" domain="[]" context="{'group_by':'state'}"/>
76 <separator orientation="vertical"/>76 <separator orientation="vertical"/>
77 <filter string="Accounting Date of Withhold" icon="terp-go-month" domain="[]" context="{'group_by':'date_ret'}"/>77 <filter string="Accounting Date of Withhold" domain="[]" context="{'group_by':'date_ret'}"/>
78 </group>78 </group>
79 </search>79 </search>
80 </field>80 </field>
@@ -87,7 +87,7 @@
87 <field name="arch" type="xml">87 <field name="arch" type="xml">
88 <tree colors="blue:state=='draft'" string="Social Responsibility Commitment Withholding">88 <tree colors="blue:state=='draft'" string="Social Responsibility Commitment Withholding">
89 <field name="name"/>89 <field name="name"/>
90 <field name="type"/>90 <field name="type" readonly="1"/>
91 <field name="code"/>91 <field name="code"/>
92 <field name="number"/>92 <field name="number"/>
93 <field name="partner_id"/>93 <field name="partner_id"/>
@@ -107,11 +107,16 @@
107 <field name="type">form</field>107 <field name="type">form</field>
108 <field name="arch" type="xml">108 <field name="arch" type="xml">
109 <form string="Social Responsibility Commitment Withholding">109 <form string="Social Responsibility Commitment Withholding">
110 <field name="uid_wh_agent" invisible="1"/>
111 <field name="partner_list" string="Partners List"
112 context="{'partner_list': partner_list} " invisible="1"/>
110 <group colspan="4" col="6">113 <group colspan="4" col="6">
111 <field name="journal_id"/>114 <field name="journal_id"/>
112 <field name="type"/>115 <field name="type" readonly="1"/>
113 <field name="code"/>116 <field name="code"/>
114 <field name="partner_id" on_change="onchange_partner_id(type,partner_id)"/>117 <field name="partner_id" on_change="onchange_partner_id(type,partner_id)"
118 attrs="{'readonly':['&amp;',('uid_wh_agent','=',False),('type','=','in_invoice')]}"
119 domain="[('id','in',context.get('partner_list' , False))]" />
115 <field name="currency_id"/>120 <field name="currency_id"/>
116 <field name="date_ret"/>121 <field name="date_ret"/>
117 <field name="account_id"/>122 <field name="account_id"/>
@@ -132,10 +137,10 @@
132 <field name="state"/>137 <field name="state"/>
133 </group>138 </group>
134 <group col="4" colspan="2">139 <group col="4" colspan="2">
135 <button name="wh_src_confirmed" states="draft" string="Confirm" icon="gtk-ok"/>140 <button name="wh_src_confirmed" states="draft" string="Confirm" />
136 <button name="wh_src_done" states="confirmed" string="Done" icon="gtk-execute"/>141 <button name="wh_src_done" states="confirmed" string="Done" />
137 <button name="wh_src_cancel" states="done" string="Cancel" icon="gtk-cancel"/>142 <button name="wh_src_cancel" states="done" string="Cancel" />
138 <button name="wh_src_draft" states="cancel,confirmed" string="Set to draft" icon="gtk-refresh"/>143 <button name="wh_src_draft" states="cancel,confirmed" string="Set to draft" />
139 </group>144 </group>
140 </page>145 </page>
141 <page string="Other Information">146 <page string="Other Information">
@@ -153,7 +158,7 @@
153 <field name="view_type">form</field>158 <field name="view_type">form</field>
154 <field name="view_mode">tree,form</field>159 <field name="view_mode">tree,form</field>
155 <field name="domain">[('type','=','out_invoice')]</field>160 <field name="domain">[('type','=','out_invoice')]</field>
156 <field name="context">{'type':'out_invoice'}</field>161 <field name="context">{'default_type':'out_invoice', 'type':'out_invoice' }</field>
157 <field name="search_view_id" ref="view_wh_src_filter"/>162 <field name="search_view_id" ref="view_wh_src_filter"/>
158 <field name="help">With Social Responsibility Commitment Withholding Customer you can create and manage document withholding issued to your customers. OpenERP can also generate document withholding automatically from invoices. For retention must add the invoices, process them and then validate the document.</field>163 <field name="help">With Social Responsibility Commitment Withholding Customer you can create and manage document withholding issued to your customers. OpenERP can also generate document withholding automatically from invoices. For retention must add the invoices, process them and then validate the document.</field>
159 </record>164 </record>
@@ -185,7 +190,7 @@
185 <field name="view_type">form</field>190 <field name="view_type">form</field>
186 <field name="view_mode">tree,form</field>191 <field name="view_mode">tree,form</field>
187 <field name="domain">[('type','=','in_invoice')]</field>192 <field name="domain">[('type','=','in_invoice')]</field>
188 <field name="context">{'type':'in_invoice'}</field>193 <field name="context">{'default_type':'in_invoice','type':'in_invoice'}</field>
189 <field name="search_view_id" ref="view_wh_src_filter"/>194 <field name="search_view_id" ref="view_wh_src_filter"/>
190 <field name="help">With Social Responsibility Commitment Withholding Supplier you can create and manage document withholding issued to your customers. OpenERP can also generate document withholding automatically from invoices. For retention must add the invoices, process them and then validate the document.</field>195 <field name="help">With Social Responsibility Commitment Withholding Supplier you can create and manage document withholding issued to your customers. OpenERP can also generate document withholding automatically from invoices. For retention must add the invoices, process them and then validate the document.</field>
191 </record>196 </record>
192197
=== modified file 'l10n_ve_withholding_src/wizard/__init__.py'
--- l10n_ve_withholding_src/wizard/__init__.py 2012-01-26 04:52:17 +0000
+++ l10n_ve_withholding_src/wizard/__init__.py 2013-01-14 19:15:27 +0000
@@ -23,7 +23,8 @@
23# along with this program. If not, see <http://www.gnu.org/licenses/>.23# along with this program. If not, see <http://www.gnu.org/licenses/>.
24################################################################################24################################################################################
2525
26import wizard_ret_munici_xml26#~ import wizard_ret_munici_xml
27import wizard_retention
2728
2829
29# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:30# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
3031
=== added file 'l10n_ve_withholding_src/wizard/wizard_retention.py'
--- l10n_ve_withholding_src/wizard/wizard_retention.py 1970-01-01 00:00:00 +0000
+++ l10n_ve_withholding_src/wizard/wizard_retention.py 2013-01-14 19:15:27 +0000
@@ -0,0 +1,59 @@
1#!/usr/bin/python
2# -*- encoding: utf-8 -*-
3###########################################################################
4# Module Writen to OpenERP, Open Source Management Solution
5# Copyright (C) OpenERP Venezuela (<http://openerp.com.ve>).
6# All Rights Reserved
7###############Credits######################################################
8# Coded by: Vauxoo C.A.
9# Planified by: Humberto Arocha
10# Audited by: Vauxoo C.A.
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 published by
14# the Free Software Foundation, either version 3 of the License, or
15# (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
27from osv import osv
28from osv import fields
29from tools.translate import _
30
31class wiz_retention(osv.osv_memory):
32 _name = 'wiz.retention'
33 _description = "Wizard that changes the retention value"
34
35 def set_retention(self, cr, uid, ids, context=None):
36 if context is None:
37 context={}
38 data = self.pool.get('wiz.retention').read(cr, uid, ids)[0]
39 if not data['sure']:
40 raise osv.except_osv(_("Error!"), _("Please confirm that you want to do this by checking the option"))
41
42 inv_obj = self.pool.get('account.invoice')
43 n_retention = data['name']
44
45 if n_retention and n_retention > 5:
46 raise osv.except_osv(_("Error!"), _("Maximum retention is 5%"))
47 else:
48 invoice = inv_obj.browse(cr, uid, context['active_id'])
49 inv_obj.write(cr, uid, context.get('active_id'), {'wh_src_rate': n_retention}, context=context)
50
51 return {}
52
53 _columns = {
54 'name': fields.float('Retention Value', required=True),
55 'sure': fields.boolean('Are you sure?'),
56 }
57
58wiz_retention()
59
060
=== added file 'l10n_ve_withholding_src/wizard/wizard_retention_view.xml'
--- l10n_ve_withholding_src/wizard/wizard_retention_view.xml 1970-01-01 00:00:00 +0000
+++ l10n_ve_withholding_src/wizard/wizard_retention_view.xml 2013-01-14 19:15:27 +0000
@@ -0,0 +1,36 @@
1<?xml version="1.0" encoding="utf-8"?>
2<openerp>
3 <data>
4
5
6 <record model="ir.ui.view" id="wizard_retention_form">
7 <field name="name">wizard.retention.form</field>
8 <field name="model">wiz.retention</field>
9 <field name="arch" type="xml">
10 <form string="Are you sure you want to do this?" version="7.0">
11 <label for="name" />
12 <field name="name" />
13 <newline/><newline/>
14 <label for="sure" />
15 <field name="sure" />
16
17 <footer>
18 <button name="set_retention" string="Confirm" type="object" icon="terp-check" class="oe_highlight"/>
19 or
20 <button special='cancel' string="Cancel" icon="terp-gtk-stop" class="oe_link" />
21 </footer>
22 </form>
23 </field>
24 </record>
25
26 <record id="action_wiz_retention" model="ir.actions.act_window">
27 <field name="name">Change retention</field>
28 <field name="type">ir.actions.act_window</field>
29 <field name="res_model">wiz.retention</field>
30 <field name="view_type">form</field>
31 <field name="view_mode">form</field>
32 <field name="target">new</field>
33 </record>
34
35 </data>
36</openerp>

Subscribers

People subscribed via source and target branches

to all changes: