Merge lp:~vauxoo/openerp-venezuela-localization/7.0-unleashed into lp:openerp-venezuela-localization

Proposed by Nhomar - Vauxoo
Status: Merged
Merged at revision: 910
Proposed branch: lp:~vauxoo/openerp-venezuela-localization/7.0-unleashed
Merge into: lp:openerp-venezuela-localization
Diff against target: 324 lines (+74/-97)
6 files modified
l10n_ve_fiscal_requirements/view/account_invoice_view.xml (+54/-56)
l10n_ve_fiscal_requirements/view/partner_view.xml (+6/-39)
l10n_ve_withholding/view/l10n_ve_withholding_view.xml (+1/-1)
l10n_ve_withholding_islr/model/invoice.py (+2/-1)
l10n_ve_withholding_islr/model/islr_wh_doc.py (+10/-0)
ovl/__openerp__.py (+1/-0)
To merge this branch: bzr merge lp:~vauxoo/openerp-venezuela-localization/7.0-unleashed
Reviewer Review Type Date Requested Status
OpenERP para localización Venezolana. Pending
Review via email: mp+195174@code.launchpad.net

Description of the change

Varias cosas resueltas.

- Varias vistas estaban incorrectamente organizadas.

- La vista de partenr Form estaba sobreescrita por completo perdiento la posibilidad de manejar la forma original en v7.0 padre - > Hijo con contactos.

- Varios errores no leíbles por humano manejados para poder dar mensajes que guíen al usuario a saber que configurar, sobre todo referido a los journals y a las cuentas contables, dejando inutilizable las facturas de compra.

- Agregada dependencia a Document.

To post a comment you must log in.
Revision history for this message
hbto [Vauxoo] http://www.vauxoo.com (humbertoarocha) wrote :

Antes de mezclar debes poner el archivo actualizado pot en el módulo que
modificas.

Saludos
On Nov 14, 2013 2:07 AM, <email address hidden> wrote:

> The proposal to merge
> lp:~vauxoo/openerp-venezuela-localization/7.0-unleashed into
> lp:openerp-venezuela-localization has been updated.
>
> Status: Needs review => Merged
>
> For more details, see:
>
> https://code.launchpad.net/~vauxoo/openerp-venezuela-localization/7.0-unleashed/+merge/195174
> --
>
> https://code.launchpad.net/~vauxoo/openerp-venezuela-localization/7.0-unleashed/+merge/195174
> You are subscribed to branch lp:openerp-venezuela-localization.
>

Revision history for this message
hbto [Vauxoo] http://www.vauxoo.com (humbertoarocha) wrote :

Esto debido a que estuviste creando contenido que es sensible a ser
traducido
On Nov 14, 2013 2:59 AM, "Humberto Arocha" <email address hidden> wrote:

> Antes de mezclar debes poner el archivo actualizado pot en el módulo que
> modificas.
>
> Saludos
> On Nov 14, 2013 2:07 AM, <email address hidden> wrote:
>
>> The proposal to merge
>> lp:~vauxoo/openerp-venezuela-localization/7.0-unleashed into
>> lp:openerp-venezuela-localization has been updated.
>>
>> Status: Needs review => Merged
>>
>> For more details, see:
>>
>> https://code.launchpad.net/~vauxoo/openerp-venezuela-localization/7.0-unleashed/+merge/195174
>> --
>>
>> https://code.launchpad.net/~vauxoo/openerp-venezuela-localization/7.0-unleashed/+merge/195174
>> You are subscribed to branch lp:openerp-venezuela-localization.
>>
>

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'l10n_ve_fiscal_requirements/view/account_invoice_view.xml'
2--- l10n_ve_fiscal_requirements/view/account_invoice_view.xml 2013-05-23 04:34:03 +0000
3+++ l10n_ve_fiscal_requirements/view/account_invoice_view.xml 2013-11-14 06:32:44 +0000
4@@ -12,58 +12,52 @@
5 <field name="model">account.invoice</field>
6 <field name="inherit_id" ref="account.invoice_form"/>
7 <field name="arch" type="xml">
8+ <!-- Dates on invoices necesary to include the concept of "received by customer" -->
9 <xpath expr="//field[@name='date_invoice']" position="replace">
10- <group colspan="6" cols="2">
11- <field name="date_invoice"/>
12- <label align="0.0" string="(keep empty to use the current date, this will be date used in accounting and Fiscal moves)"/>
13- </group>
14- <newline/>
15- <group colspan="6" cols="2">
16- <field name="date_document"/>
17- <label align="0.0" string="(Put here the date when Sale Invoice was delivered to customer)"/>
18- </group>
19- <newline/>
20- </xpath>
21-
22+ <group colspan="4" cols="2">
23+ <group colspan="1" cols="1">
24+ <label for="date_invoice" />
25+ <newline/>
26+ <field name="date_invoice" nolabel="1"/>
27+ <newline/>
28+ <label
29+ string="(keep empty to use the current date, this will be date used in accounting and Fiscal moves)"/>
30+ </group>
31+ <group colspan="1" cols="1">
32+ <label for="date_document" />
33+ <newline/>
34+ <field name="date_document" nolabel="1"/>
35+ <newline/>
36+ <label string="(Put here the date when Sale Invoice was delivered to customer)"/>
37+ </group>
38+ </group>
39+ <newline/>
40+ </xpath> <!-- End of dates Section -->
41 <xpath expr="//page[@string='Payments']" position="after">
42 <page string="Debit-Credit Notes" attrs="{'invisible':['|','|',('type','=','in_refund'),('type','=','out_refund'),('parent_id','!=',False)]}">
43 <newline/>
44 <field name="child_ids" nolabel="1" widget="many2many" domain="[('partner_id','=',partner_id),('id', '!=', active_id),('type','in',['out_invoice', 'out_refund'])]"/>
45 </page>
46 </xpath>
47-
48 <xpath expr="//page[@string='Other Info']/group/group[2]" position="after">
49-
50 <group colspan="2">
51 <separator colspan="6" string="Fiscal Information"/>
52 <field name="sin_cred"/>
53- <!--
54- <field name="invoice_printer" groups="parameters_fiscal_printer.group_parameters_fiscal_printer_user"/>
55- <field name="fiscal_printer" groups="parameters_fiscal_printer.group_parameters_fiscal_printer_user"/>
56- -->
57 <field name="loc_req" invisible="1"/>
58 <field name="invoice_printer" attrs="{'invisible':[('loc_req','=',True)]}"/>
59 <field name="fiscal_printer" attrs="{'invisible':[('loc_req','=',True)]}"/>
60 <field name="z_report" attrs="{'invisible':[('loc_req','=',True)]}"/>
61-
62 <field name="parent_id" attrs="{'invisible':[('parent_id','=',False)]}" domain="[('partner_id','=',partner_id),('id', '!=', active_id),('type','in',['out_invoice', 'out_refund'])]"/>
63 <field name="nro_ctrl"/>
64- <button name="%(action_wiz_nroctrl)d" type="action" string="Change control number" icon="gtk-execute" colspan="6"/>
65+ <button name="%(action_wiz_nroctrl)d" type="action" string="Change control number" colspan="6"/>
66 </group>
67 </xpath>
68-<!--
69- <xpath expr="//field[@name='address_invoice_id']" position="replace">
70- <field name="address_invoice_id" domain="[('partner_id','=',partner_id), ('type','=','invoice')]"/>
71- </xpath>
72--->
73- <xpath expr="//button[@string='Refund Invoice']" position="after">
74- <button name="%(action_account_invoice_debit)d" type="action" string="Debit Note" icon="gtk-execute" attrs="{'invisible':['|','|',('state','in',['proforma2','proforma','cancel', 'draft']),('type','in',['out_refund', 'in_refund']),('parent_id','!=',False)]}"/>
75- </xpath>
76- <xpath expr="//button[@string='Refund Invoice']" position="after">
77- <button name="%(action_account_invoice_parent)d" type="action" string="Parent Invoice" states="open,paid" icon="gtk-execute" attrs="{'invisible':[('type','!=','out_refund')]}"/>
78+ <xpath expr="//button[@string='Refund Invoice']" position="after">
79+ <button name="%(action_account_invoice_debit)d" type="action" string="Debit Note" attrs="{'invisible':['|','|',('state','in',['proforma2','proforma','cancel', 'draft']),('type','in',['out_refund', 'in_refund']),('parent_id','!=',False)]}"/>
80+ <button name="%(action_account_invoice_parent)d" type="action" string="Parent Invoice" states="open,paid" attrs="{'invisible':[('type','!=','out_refund')]}"/>
81 </xpath>
82 <xpath expr="//button[@string='Refund Invoice']" position="replace">
83- <button name="%(account.action_account_invoice_refund)d" type="action" string="Refund Invoice" icon="gtk-execute" attrs="{'invisible':['|',('type','in',['out_refund', 'in_refund']),('parent_id','!=',False)]}"/>
84+ <button name="%(account.action_account_invoice_refund)d" type="action" string="Refund Invoice" attrs="{'invisible':['|',('type','in',['out_refund', 'in_refund']),('parent_id','!=',False)]}"/>
85
86 </xpath>
87 </field>
88@@ -82,10 +76,11 @@
89 <field name="inherit_id" ref="account.invoice_tree"/>
90 <field name="arch" type="xml">
91 <xpath expr="//field[@name='origin']" position="after">
92- <field name="parent_id"/>
93+ <field name="parent_id" string="Invoice Related"/>
94 </xpath>
95 </field>
96 </record>
97+
98 <!--
99 =====================================================
100 Invoices Extension SUPPLIER
101@@ -99,14 +94,21 @@
102 <field name="inherit_id" ref="account.invoice_supplier_form"/>
103 <field name="arch" type="xml">
104 <xpath expr="//field[@name='date_invoice']" position="replace">
105- <group colspan="6" cols="2">
106- <field name="date_invoice"/>
107- <label align="0.0" string="(keep empty to use the current date, this will be date used in accounting and Fiscal moves)"/>
108- </group>
109- <newline/>
110- <group colspan="6" cols="2">
111- <field name="date_document"/>
112- <label align="0.0" string="(Put here the date when Purchase Invoice was generated for the supplier)"/>
113+ <group colspan="4" cols="2">
114+ <group colspan="1" cols="1">
115+ <label for="date_invoice" />
116+ <newline/>
117+ <field name="date_invoice" nolabel="1"/>
118+ <newline/>
119+ <label string="(keep empty to use the current date, this will be date used in accounting and Fiscal moves)"/>
120+ </group>
121+ <group colspan="1" cols="1">
122+ <label for="date_document"/>
123+ <newline/>
124+ <field name="date_document" nolabel="1"/>
125+ <newline/>
126+ <label string="(Put here the date when Purchase Invoice was generated for the supplier)"/>
127+ </group>
128 </group>
129 <newline/>
130 </xpath>
131@@ -116,21 +118,17 @@
132 <field name="sin_cred"/>
133 <field name="parent_id" attrs="{'invisible':[('parent_id','=',False)]}" domain="[('partner_id','=',partner_id),('id', '!=', active_id),('type','in',['out_invoice', 'out_refund'])]"/>
134 <field name="nro_ctrl" required="1"/>
135- <button name="%(action_wiz_nroctrl)d" type="action" string="Change control number" icon="gtk-execute" colspan="6"/>
136+ <button name="%(action_wiz_nroctrl)d" type="action"
137+ string="Change control number" colspan="6"
138+ help="One time you print the invoice you must set the control number pre-printed in the paper, this is the button."/>
139 </group>
140 </xpath>
141
142 <xpath expr="//button[@string='Ask Refund']" position="replace">
143- <button name="%(account.action_account_invoice_refund)d" type="action" string="Refund Invoice" states="open,paid" icon="gtk-execute"/>
144- </xpath>
145-
146-
147-<!--
148- <xpath expr="//field[@name='supplier_invoice_number']" position="after">
149- <field name="address_invoice_id" domain="[('partner_id','=',partner_id), ('type','=','invoice')]"/>
150- </xpath>
151--->
152-
153+ <button name="%(account.action_account_invoice_refund)d" type="action"
154+ string="Refund Invoice" states="open,paid"
155+ help="Create an Refund to pay this invoice, remember validate it this wizard only will relate both invoices."/>
156+ </xpath>
157 <xpath expr="//page[@string='Payments']" position="after">
158 <page string="Debit-Credit Notes" attrs="{'invisible':['|','|',('type','=','in_refund'),('type','=','out_refund'),('parent_id','!=',False)]}">
159 <field name="child_ids" nolabel="1" widget="many2many" domain="[('partner_id','=',partner_id),('id', '!=', active_id),('type','in',['in_invoice', 'in_refund'])]"/>
160@@ -138,10 +136,12 @@
161 </xpath>
162
163 <xpath expr="//button[@string='Refund Invoice']" position="after">
164- <button name="%(action_account_invoice_debit)d" type="action" string="Debit Note" icon="gtk-execute" attrs="{'invisible':['|',('state','in',['proforma2','proforma','cancel', 'draft']),('type','in',['out_refund', 'in_refund'])]}"/>
165+ <button name="%(action_account_invoice_debit)d" type="action"
166+ string="Debit Note" attrs="{'invisible':['|',('state','in',['proforma2','proforma','cancel', 'draft']),('type','in',['out_refund', 'in_refund'])]}"
167+ help="A debit note from accounting and fiscal point of view is exactly as an invoice but with a parent invoice related, this module create an invoice automatically with this invoice as parent, remember Debit note will increase the payable and receivable exactly as an invoice."/>
168 </xpath>
169 <xpath expr="//button[@string='Refund Invoice']" position="after">
170- <button name="%(action_account_invoice_parent)d" type="action" string="Parent Invoice" states="open,paid" icon="gtk-execute" attrs="{'invisible':[('type','!=','in_refund')]}"/>
171+ <button name="%(action_account_invoice_parent)d" type="action" string="Parent Invoice" states="open,paid" attrs="{'invisible':[('type','!=','in_refund')]}" help="If you want re-asign a parent invoice and avoid do this repeating all the process this is the button to do that, reasing securely a parent invoice to a debit note or a credit note."/>
172 </xpath>
173
174 </field>
175@@ -184,8 +184,6 @@
176 <field name="act_window_id" ref="action_sale_debit_tree"/>
177 </record>
178
179-
180-
181 <menuitem action="action_sale_debit_tree" id="menu_action_sale_debit_tree" parent="account.menu_finance_receivables"/>
182
183 <record id="action_purchase_debit_tree" model="ir.actions.act_window">
184@@ -232,4 +230,4 @@
185 </record>
186
187 </data>
188-</openerp>
189\ No newline at end of file
190+</openerp>
191
192=== modified file 'l10n_ve_fiscal_requirements/view/partner_view.xml'
193--- l10n_ve_fiscal_requirements/view/partner_view.xml 2013-05-31 20:17:10 +0000
194+++ l10n_ve_fiscal_requirements/view/partner_view.xml 2013-11-14 06:32:44 +0000
195@@ -1,51 +1,18 @@
196 <?xml version='1.0' encoding='UTF-8'?>
197 <openerp>
198 <data>
199-
200- <record id="view_partner_form2" model="ir.ui.view">
201- <field name="name">res.partner.vat.inherit2</field>
202+ <record id="view_partner_form_ve" model="ir.ui.view">
203+ <field name="name">res.partner.ve</field>
204 <field name="model">res.partner</field>
205 <field name="inherit_id" ref="base.view_partner_form"/>
206 <field name="arch" type="xml">
207-
208- <xpath expr="//button[@name=&quot;button_check_vat&quot;]" position="replace"/>
209- <xpath expr="//field[@name=&quot;vat&quot;]" position="replace"/>
210-
211- <xpath expr="//field[@name='name']" position="replace">
212+ <xpath expr="//div[@name='buttons']" position="inside">
213 <field name="seniat_updated" invisible="1"/>
214- <field name="name" attrs="{'readonly': [('seniat_updated', '!=', False)]}"/>
215+ <field name="uid_country" colspan="2" invisible="1"/>
216+ <button name="%(action_wiz_name)d" string="Update Name" type="action"
217+ help="Connect to SENIAT and update the name of the partner given an VAT Number. (See Accounting tab to write the VAT Number)"/>
218 </xpath>
219-
220- <xpath expr="//label[@for=&quot;vat&quot;]" position="replace">
221- </xpath>
222- <xpath expr="//field[@name=&quot;vat_subjected&quot;]" position="replace">
223- </xpath>
224-
225- <xpath expr="//field[@name=&quot;parent_id&quot;]" position="before">
226- <label for="vat"/>
227- <field name="vat" colspan="2" placeholder="e.g. VE123456789" class="oe_inline" attrs="{'required':[('uid_country','=','VE'),'|','&amp;','&amp;',('is_company','=',False),('parent_id','!=',False),('type','=','invoice'), ('parent_id','=',False)] }"/>
228- <button name="button_check_vat" string="Check Validity" type="object" icon="gtk-execute" class="oe_inline"/>
229- <button name="%(action_wiz_name)d" string="Update Name" type="action" icon="gtk-execute" class="oe_inline"/>
230- <field name="uid_country" colspan="2" invisible="1"/>
231- </xpath>
232-
233- <xpath expr="//field[@name=&quot;street&quot;]" position="replace">
234- <field name="street" placeholder="Av. Siempre Viva" colspan="2" attrs="{'required':[('uid_country','=','VE'),'|','&amp;','&amp;',('is_company','=',False),('parent_id','!=',False),('type','=','invoice'), ('parent_id','=',False)] }"/>
235- </xpath>
236-
237- <xpath expr="//field[@name=&quot;city&quot;]" position="replace">
238- <field name="city" placeholder="Caracas" colspan="2" attrs="{'required':[('uid_country','=','VE'),'|','&amp;','&amp;',('is_company','=',False),('parent_id','!=',False),('type','=','invoice'), ('parent_id','=',False)] }"/>
239- </xpath>
240-
241- <xpath expr="//field[@name=&quot;country_id&quot;]" position="replace">
242- <field name="country_id" placeholder="Venezuela" class="oe_no_button" options="{&quot;no_open&quot;: True}" colspan="2" attrs="{'required':[('uid_country','=','VE'),'|','&amp;','&amp;',('is_company','=',False),('parent_id','!=',False),('type','=','invoice'), ('parent_id','=',False)] }"/>
243- </xpath>
244-
245- <xpath expr="//field[@name=&quot;phone&quot;]" position="replace">
246- <field name="phone" placeholder="+58 414 432 27 20" class="oe_no_button" options="{&quot;no_open&quot;: True}" colspan="2" attrs="{'required':[('uid_country','=','VE'),'|','&amp;','&amp;',('is_company','=',False),('parent_id','!=',False),('type','=','invoice'), ('parent_id','=',False)] }"/>
247- </xpath>
248 </field>
249 </record>
250-
251 </data>
252 </openerp>
253
254=== modified file 'l10n_ve_withholding/view/l10n_ve_withholding_view.xml'
255--- l10n_ve_withholding/view/l10n_ve_withholding_view.xml 2013-05-31 20:17:10 +0000
256+++ l10n_ve_withholding/view/l10n_ve_withholding_view.xml 2013-11-14 06:32:44 +0000
257@@ -55,7 +55,7 @@
258 <record id="wh_partner" model="ir.ui.view">
259 <field name="name">res.partner.form.wh</field>
260 <field name="model">res.partner</field>
261- <field name="inherit_id" ref="l10n_ve_fiscal_requirements.view_partner_form2"/>
262+ <field name="inherit_id" ref="l10n_ve_fiscal_requirements.view_partner_form_ve"/>
263 <field name="arch" type="xml">
264 <xpath expr="//page[@string='Internal Notes']" position="after">
265 <page string="Withholdings">
266
267=== modified file 'l10n_ve_withholding_islr/model/invoice.py'
268--- l10n_ve_withholding_islr/model/invoice.py 2013-11-11 16:26:50 +0000
269+++ l10n_ve_withholding_islr/model/invoice.py 2013-11-14 06:32:44 +0000
270@@ -174,13 +174,14 @@
271 wh_ret_code = wh_doc_obj.retencion_seq_get(cr, uid)
272
273 if wh_ret_code:
274+ journal = wh_doc_obj._get_journal(cr, uid, context=context)
275 islr_wh_doc_id = wh_doc_obj.create(cr, uid,
276 {'name': wh_ret_code,
277 'partner_id': row.partner_id.id,
278 'period_id': row.period_id.id,
279 'account_id': row.account_id.id,
280 'type': row.type,
281- 'journal_id': wh_doc_obj._get_journal(cr, uid, context=context), })
282+ 'journal_id': journal, })
283 self._create_doc_invoices(cr, uid, row.id, islr_wh_doc_id)
284
285 self.pool.get('islr.wh.doc').compute_amount_wh(cr, uid,
286
287=== modified file 'l10n_ve_withholding_islr/model/islr_wh_doc.py'
288--- l10n_ve_withholding_islr/model/islr_wh_doc.py 2013-07-23 14:23:34 +0000
289+++ l10n_ve_withholding_islr/model/islr_wh_doc.py 2013-11-14 06:32:44 +0000
290@@ -70,6 +70,11 @@
291 if res:
292 return res[0]
293 else:
294+ raise osv.except_osv(_('Configuration Incomplete.'),
295+ _("""I couldn't find a journal to execute the Witholding ISLR
296+ automatically, please create one in Accounting > Configuration > Journals, contact
297+ to the account manager if you don't have access to this menu.!!!"""))
298+
299 return False
300
301 def _get_currency(self, cr, uid, context):
302@@ -782,6 +787,11 @@
303 for i in ail_brws:
304 values = self._get_xml_lines(cr, uid, i, context=context)
305 values.update({'islr_wh_doc_inv_id': ret_line.id, })
306+ if not values.get('supplier_invoice_number'):
307+ raise osv.except_osv(_("Error on Human Process"),
308+ _("Please fill the Invoice number to continue, without this number will be"
309+ " imposible form the system make the withholding"))
310+
311 #~ Vuelve a crear las lineas
312 xml_id = ixwl_obj.create(cr, uid, values, context=context)
313 #~ Write back the new xml_id into the account_invoice_line
314
315=== modified file 'ovl/__openerp__.py'
316--- ovl/__openerp__.py 2013-03-05 15:25:37 +0000
317+++ ovl/__openerp__.py 2013-11-14 06:32:44 +0000
318@@ -30,6 +30,7 @@
319 "l10n_ve_withholding_islr" ,
320 "l10n_ve_withholding_muni",
321 "l10n_ve_withholding_src",
322+ "document",
323 #TODO: Uncomment when Fiscal Book Module becomes ready
324 #"l10n_ve_fiscal_book",
325