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

Proposed by Katherine Zaoral (Vauxoo)
Status: Merged
Merged at revision: 811
Proposed branch: lp:~vauxoo/openerp-venezuela-localization/ovl70-fr-rev-kty
Merge into: lp:~vauxoo/openerp-venezuela-localization/ovl70-fr-rev-hbto
Diff against target: 593 lines (+72/-128)
20 files modified
l10n_ve_fiscal_requirements/model/invoice.py (+9/-16)
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.xml (+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)
To merge this branch: bzr merge lp:~vauxoo/openerp-venezuela-localization/ovl70-fr-rev-kty
Reviewer Review Type Date Requested Status
hbto [Vauxoo] http://www.vauxoo.com Pending
Review via email: mp+139019@code.launchpad.net

Description of the change

[INFO] finalizada revision de los test de fiscal requirements

To post a comment you must log in.
807. By Katherine Zaoral (Vauxoo)

[DEL] borrando mensajes de impresion de prueba

808. By Katherine Zaoral (Vauxoo)

[MERGE] ovl70-fr-rev-hbto

809. By Katherine Zaoral (Vauxoo)

[MERGE] localization 7.0 @ revision 766

810. By Katherine Zaoral (Vauxoo)

[INFO] revision de las pruebas con los test yml

811. By Katherine Zaoral (Vauxoo)

[FIX] 'res.partner.address': Removed the record for being an deprecated model. Test was adapted to integrate the info of the addresses in the 'res.partner' records.
---- ES_es
[FIX] 'res.partner.address': eliminado record por ser un modelo obsoleto, y adaptacion de la prueba para integrar la info de las direcciones en los records 'res.partner'.

812. By Katherine Zaoral (Vauxoo)

 [FIX] adaptacion de las vistas con openerp 7 (deprecated type)

813. By Katherine Zaoral (Vauxoo)

[FIX] campo 'tax_id' referenciado en test/fr_damaged.yml no existe, se referia a 'tax_code_id'

814. By Katherine Zaoral (Vauxoo)

[FIX] Adaptation for compatibility with OpenERP 7.0 wizard. Erased the line import wizard.
---- ES_es
[FIX] Adaptación para compatibilidad de los wizard con Openerp 7.0. Se borro la linea import wizard.

815. By Katherine Zaoral (Vauxoo)

[FIX] misuse of context in browse orm call that generate an error in mids.move_id.id (because this call overwrite the context with only ['move_id'] - OMG a list ).

816. By Katherine Zaoral (Vauxoo)

[IMP] se quito el metodo obsoleto _get_period y se uso period.find()

817. By Katherine Zaoral (Vauxoo)

[FIX] error in the _refund_cleanup_lines() function (impossible delet a browse record type)

818. By Katherine Zaoral (Vauxoo)

[FIX] yml: quitado referencias a registros que ya no existen de 'product' y redirigidos a otros que si.
[FIX] yml: se quitaron campos que ya no existen 'address_contact_id' y 'address_invoice_id'

819. By Katherine Zaoral (Vauxoo)

[MERGE] localization revno 770

820. By Katherine Zaoral (Vauxoo)

[FIX] eliminado metodo _refund_cleanup_lines(). sin razon de existir. Resulta que funciona perfectamente pero en 'wizard/account.invoice.refund.py:linea 255' se utiliza para limpiar tax_lines, entonces produce error ya que los campos en el metodo estan especificados para invoice_lines y no para tax_lines y producia keyErrror. Dejando el metood que viene en el core no hay problema porque el revisa todos los campos propios del modelo y apartir de ahi hace su accion

821. By Katherine Zaoral (Vauxoo)

[FIX] error al correr las pruebas porque read() devolvia una tupla en lugar de un browseable

822. By Katherine Zaoral (Vauxoo)

[FIX] record roto a 'product', enlazado a un record que si existe

823. By Katherine Zaoral (Vauxoo)

[FIX] cambio del mal uso de campo 'description' (no existe) por el campo 'name' del modelo 'account.inovice'.

824. By Katherine Zaoral (Vauxoo)

[MERGE] localization revno 771

825. By Katherine Zaoral (Vauxoo)

[FIX] solucionado error de indexacion en el test case 8.12 (IndexError: list index out of range)

826. By Katherine Zaoral (Vauxoo)

[FIX] eliminadas lineas relativas al campo 'sale_ids', no esta definido. este campo fue borrado de 'account_invoice' en fiscal requirements en la revion 499 de la localizacion

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== 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-11 18:35:30 +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
=== 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-11 18:35:30 +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-11 18:35:30 +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-11 18:35:30 +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-11 18:35:30 +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-11 18:35:30 +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-11 18:35:30 +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-11 18:35:30 +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-11 18:35:30 +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-11 18:35:30 +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-11 18:35:30 +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-11 18:35:30 +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-11 18:35:30 +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-11 18:35:30 +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-11 18:35:30 +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.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-11 18:35:30 +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.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-11 18:35:30 +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-11 18:35:30 +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-11 18:35:30 +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-11 18:35:30 +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"/>

Subscribers

People subscribed via source and target branches