Merge lp:~icsergio/openobject-italia/61_imp_withholding_tax into lp:~openobject-italia-core-devs/openobject-italia/italian-addons-6.1

Proposed by Sergio Corato
Status: Needs review
Proposed branch: lp:~icsergio/openobject-italia/61_imp_withholding_tax
Merge into: lp:~openobject-italia-core-devs/openobject-italia/italian-addons-6.1
Diff against target: 288 lines (+90/-116)
4 files modified
l10n_it_withholding_tax/__openerp__.py (+3/-2)
l10n_it_withholding_tax/account.py (+68/-79)
l10n_it_withholding_tax/account_view.xml (+1/-35)
l10n_it_withholding_tax/tax_view.xml (+18/-0)
To merge this branch: bzr merge lp:~icsergio/openobject-italia/61_imp_withholding_tax
Reviewer Review Type Date Requested Status
Lorenzo Battistini Needs Information
Review via email: mp+189442@code.launchpad.net

Description of the change

A simpler and so more efficient implementation of withholding tax, with the same features of original one.

To post a comment you must log in.
Revision history for this message
Sergio Corato (icsergio) wrote :

Improvement1: this implementation uses tax object's and there's no neeed to type the amount of the tax, as it's calculated.
The payment term has to be set in the tax code, together with the flag on the boolean field "withholding tax".
Improvement2: moreover, the module sets the tax expiration, at the time of payment of the linked invoice, which is the relevant time for the law.

Revision history for this message
Lorenzo Battistini (elbati) wrote :

Ciao Sergio.

The functionalities added here seem to me to be present already in the l10n_it_withholding_tax module.
Moreover this implementation doesn't use the account_voucher_cash_basis module, so I suspect it doesn't handle partial payments, exchange rate differences and so on.

Why didn't you improve the l10n_it_withholding_tax module if necessary?

review: Needs Information
Revision history for this message
Sergio Corato (icsergio) wrote :

Il 05/10/2013 10:41, Lorenzo Battistini - Agile BG ha scritto:
> Review: Needs Information
>
> Ciao Sergio.
>
> The functionalities added here seem to me to be present already in the l10n_it_withholding_tax module.
> Moreover this implementation doesn't use the account_voucher_cash_basis module, so I suspect it doesn't handle partial payments, exchange rate differences and so on.
>
> Why didn't you improve the l10n_it_withholding_tax module if necessary?
>
Ciao Lorenzo,
is that a real need or only theoretical? I say so because I've never
seen an invoice from a professional with more than 1 payment expiry,
usually at sight, nor is so usual to see an invoice before the payment.

However, I'll give it a try, if possible I'd like to use taxes for this
module.

--
Sergio Corato

IcsTools.it

web : www.icstools.it
skype : sergiocorato
mail : <email address hidden>

Revision history for this message
Sergio Corato (icsergio) wrote :

Il 05/10/2013 14:42, Sergio Corato ha scritto:
> Il 05/10/2013 10:41, Lorenzo Battistini - Agile BG ha scritto:
>> Review: Needs Information
>>
>> Ciao Sergio.
>>
>> The functionalities added here seem to me to be present already in the l10n_it_withholding_tax module.
>> Moreover this implementation doesn't use the account_voucher_cash_basis module, so I suspect it doesn't handle partial payments, exchange rate differences and so on.
>>
>> Why didn't you improve the l10n_it_withholding_tax module if necessary?
>>
> Ciao Lorenzo,
> is that a real need or only theoretical? I say so because I've never
> seen an invoice from a professional with more than 1 payment expiry,
> usually at sight, nor is so usual to see an invoice before the payment.
>
> However, I'll give it a try, if possible I'd like to use taxes for this
> module.
>
Hi Lorenzo,
I tried the official module, with account_voucher_cash_basis, and I
found that it create a scheduled payment for every payment of an invoice
with a partial payment (it'd be good), but the amounts are wrong, and it
doesn't work for payment with more expiry dates (does it work correctly
for you?).
Moreover, it doesn't use the tax object, even if it exists, and it's
possible to set an invoice with withholding tax without the correct tax
code.
Finally, I found difficult to try this unusual way of working, because
usually the payment is made before the invoice, and the invoice is only
for the sum paid.
For the currency I haven't got problems in my implementation.
Could you give me more informations about some use cases you refer?
Thanks.

--
Sergio Corato

IcsTools.it

web : www.icstools.it
skype : sergiocorato
mail : <email address hidden>

Revision history for this message
Lorenzo Battistini (elbati) wrote :

On 10/07/2013 01:39 AM, Sergio Corato wrote:
>
> Hi Lorenzo,
> I tried the official module, with account_voucher_cash_basis, and I
> found that it create a scheduled payment for every payment of an invoice
> with a partial payment (it'd be good), but the amounts are wrong, and it
> doesn't work for payment with more expiry dates (does it work correctly
> for you?).

In general, it does.

Could you describe the steps to reproduce the problem and report them to
https://bugs.launchpad.net/openobject-italia/+bugs
?

> Moreover, it doesn't use the tax object, even if it exists, and it's
> possible to set an invoice with withholding tax without the correct tax
> code.

At the moment, if you are using 6.1, 'Ritenute d'acconto' tax codes are
deprecated because they were used by the previous version of the module.
OpenERP 7.0 doesn't provide those tax codes.

An implementation that uses tax codes is certainly possible (of course,
you can propose a merge for that).
For now, users know what and when to pay using the due list.

The current implementation is broadly based on this specifications
http://wiki.openerp-italia.org/doku.php/area_utente/requisiti/ritenuta_d_acconto?&#fattura_ricevuta

> Finally, I found difficult to try this unusual way of working, because
> usually the payment is made before the invoice, and the invoice is only
> for the sum paid.
> For the currency I haven't got problems in my implementation.
> Could you give me more informations about some use cases you refer?

We have customers that sometimes pay professionals invoices partially.
I just know that they do. But if you think it's wrong, I can investigate
more.

242. By Sergio Corato

[IMP] a more accountant vision of implementation

Revision history for this message
Sergio Corato (icsergio) wrote :

Hi Lorenzo,
I commit an implementation based on the official module, I think this would be good for your needs too.
I'll do a video or something to let your know where I've found bugs (or misunderstoods?)

Revision history for this message
Sergio Corato (icsergio) wrote :

A bit more information:
- flag the parent tax.code as withholding_type and create a payment term (usually 16 of next month)
- set the withholding journal in the company.

I opened a bug for the official version here: https://bugs.launchpad.net/openobject-italia/+bug/1239216

Here I uploaded a video for this implementation https://vimeo.com/76777965

243. By Sergio Corato

[FIX] error description

244. By Sergio Corato

[FIX] calculation method

245. By Sergio Corato

[FIX] calculation method better comprehension

Revision history for this message
Lorenzo Battistini (elbati) wrote :

Hello Sergio.
Could you summarize, in the description, the changes introduced by this MP?
For example, the first improvement
"this implementation uses tax object's and there's no neeed to type the amount of the tax, as it's calculated"
is not valid anymore I think.

Moreover: how can the voucher correctly compute the amount to pay if it doesn't use the 'allocated_amounts_grouped_by_invoice' method? Is it unnecessary? (reference: http://bazaar.launchpad.net/~account-payment-team/account-payment/7.0/view/102/account_voucher_cash_basis/account_voucher.py#L83 )

Thanks!

review: Needs Information
246. By Sergio Corato

[FIX] improved formula to support more complex invoices with multiple rows and rows without withholding tax

Revision history for this message
Sergio Corato (icsergio) wrote :

Hi Lorenzo,
I did a little improvement, and from some tests it seems working well (with more service lines and no-tax lines too).
The amount are calculated in this way:

amount paid / invoice debit = % paid of debit
* withholding amount = % paid of withholding amount
* withholding rate = withholding amount to pay to tax authorities

247. By Sergio Corato

[FIX] improved move line reconcile process

Revision history for this message
Sergio Corato (icsergio) wrote :

Ok, now there are no more lines unuseful in payment.

248. By Sergio Corato

[FIX] removed unused dependancies

Revision history for this message
Sergio Corato (icsergio) wrote :

I removed dependancies from account_voucher_cash_basis and account_invoice_template (was useful the latter somewhere?)

Revision history for this message
Lorenzo Battistini (elbati) wrote :

On 10/16/2013 11:48 PM, Sergio Corato wrote:
> I removed dependancies from account_voucher_cash_basis and account_invoice_template (was useful the latter somewhere?)

account_voucher_cash_basis was used to compute the '
allocated_amounts_grouped_by_invoice', specially in cases of write-off.
Don't we need to handle write-off? Will we never have cases of foreign
currency invoices? Cases of discounts at payments?

Moreover, note that if you heavily change a module in a stable version
(like 6.1 or 7.0), you have to consider what will happen when the new
version of the module will be installed on a production database with
the old version in use.

Revision history for this message
Lorenzo Battistini (elbati) wrote :

Riporto qui la risposta

Il 17/10/2013 18:36, Lorenzo Battistini - Agile BG ha scritto:
> On 10/16/2013 11:48 PM, Sergio Corato wrote:
>> I removed dependancies from account_voucher_cash_basis and account_invoice_template (was useful the latter somewhere?)
>
> account_voucher_cash_basis was used to compute the '
> allocated_amounts_grouped_by_invoice', specially in cases of write-off.
> Don't we need to handle write-off?
> Cases of discounts at payments?

Are you sure if we have a discount the amount of withholding tax is lowered too? Without having a regular refund invoice?
Anyone can answer to this question?

Anyway, it's a little modification of the code, if needed.

Will we never have cases of foreign
> currency invoices?
Did you try the module? Have you faced some problem?

>
>
> Moreover, note that if you heavily change a module in a stable version
> (like 6.1 or 7.0), you have to consider what will happen when the new
> version of the module will be installed on a production database with
> the old version in use.
Yeah, I know, it's only for -new- databases and an idea for the next releases.
>
>

--
Sergio Corato

Revision history for this message
Lorenzo Battistini (elbati) wrote :

"Did you try the module? Have you faced some problem?"

I just tried but can't find how taxes have to be configured in order to be used as withholding tax.
If I use the standard 'rit-20' account.tax, am I supposed to add it to every invoice line subject to withholding tax?

"Yeah, I know, it's only for -new- databases and an idea for the next releases"

So, if installations on existing databases will not be handled, this proposal has to be rejected.
Maybe we could keep the module in a separate branch and merge into official branches at the next version of OpenERP.

Revision history for this message
Sergio Corato (icsergio) wrote :

1. Exacly, like VAT. It can be that a row have one withholding tax, another
have another withholding tax, another have more withholding taxes, another
have no withholding tax.
2. Good, it was my objective. I'll link it to trunk serie, then.
Thx

2013/10/18 Lorenzo Battistini - Agile BG <email address hidden>

> "Did you try the module? Have you faced some problem?"
>
> I just tried but can't find how taxes have to be configured in order to be
> used as withholding tax.
> If I use the standard 'rit-20' account.tax, am I supposed to add it to
> every invoice line subject to withholding tax?
>
>
> "Yeah, I know, it's only for -new- databases and an idea for the next
> releases"
>
> So, if installations on existing databases will not be handled, this
> proposal has to be rejected.
> Maybe we could keep the module in a separate branch and merge into
> official branches at the next version of OpenERP.
> --
>
> https://code.launchpad.net/~icsergio/openobject-italia/61_imp_withholding_tax/+merge/189442
> Your team OpenERP Italia core devs is subscribed to branch
> lp:openobject-italia/6.1.
>
> _______________________________________________
> Mailing list: https://launchpad.net/~openobject-italia-core-devs
> Post to : <email address hidden>
> Unsubscribe : https://launchpad.net/~openobject-italia-core-devs
> More help : https://help.launchpad.net/ListHelp
>

Revision history for this message
Lorenzo Battistini (elbati) wrote :

Ciao Sergio,

ho fatto la sequente prova:

 1. Ho creato un nuovo db (6.1 installazione standard) e ho installato
    il nuovo modulo ritenute.
 2. Ho creato una fattura fornitore, come da immagine
    http://img842.imageshack.us/img842/8108/yumg.png
 3. L'ho confermata e ho ottenuto una registrazione come da immagine
    http://img713.imageshack.us/img713/8537/yrg8.png

Vedo che alla conferma della fattura รจ stato movimentato il conto
'debiti per ritenute da versare' e il conto imposta 'ritenute a debito 20%'.
Dato che le ritenute seguono il criterio di cassa, il debito non
dovrebbe essere aperto solamente al momento del pagamento?

Bisogna configurare diversamente le imposte?

Revision history for this message
Lorenzo Battistini (elbati) wrote :

This project is now hosted on https://github.com/OCA/l10n-italy. Please move your proposal there. This guide may help you https://github.com/OCA/maintainers-tools/wiki/How-to-move-a-Merge-Proposal-to-GitHub

Unmerged revisions

248. By Sergio Corato

[FIX] removed unused dependancies

247. By Sergio Corato

[FIX] improved move line reconcile process

246. By Sergio Corato

[FIX] improved formula to support more complex invoices with multiple rows and rows without withholding tax

245. By Sergio Corato

[FIX] calculation method better comprehension

244. By Sergio Corato

[FIX] calculation method

243. By Sergio Corato

[FIX] error description

242. By Sergio Corato

[IMP] a more accountant vision of implementation

241. By Sergio Corato

[ADD] withholding simpler implementation

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'l10n_it_withholding_tax/__openerp__.py'
2--- l10n_it_withholding_tax/__openerp__.py 2013-01-04 14:02:10 +0000
3+++ l10n_it_withholding_tax/__openerp__.py 2013-10-16 21:46:08 +0000
4@@ -22,7 +22,7 @@
5 ##############################################################################
6 {
7 'name': "Italian Localisation - Withholding tax",
8- 'version': '0.2',
9+ 'version': '0.3',
10 'category': 'Localisation/Italy',
11 'description': """
12 Ritenute d'acconto sulle fatture fornitore
13@@ -46,9 +46,10 @@
14 'author': 'OpenERP Italian Community',
15 'website': 'http://www.openerp-italia.org',
16 'license': 'AGPL-3',
17- "depends" : ['account_invoice_template', 'account_voucher_cash_basis'],
18+ "depends" : ['account_voucher',],
19 "init_xml" : [
20 'account_view.xml',
21+ 'tax_view.xml',
22 ],
23 "update_xml" : [],
24 "demo_xml" : [],
25
26=== modified file 'l10n_it_withholding_tax/account.py'
27--- l10n_it_withholding_tax/account.py 2013-01-04 14:02:10 +0000
28+++ l10n_it_withholding_tax/account.py 2013-10-16 21:46:08 +0000
29@@ -23,31 +23,22 @@
30
31 from osv import fields, osv
32 from tools.translate import _
33-import decimal_precision as dp
34+
35
36 class res_company(osv.osv):
37 _inherit = 'res.company'
38 _columns = {
39- 'withholding_payment_term_id': fields.many2one('account.payment.term', 'Withholding tax Payment Term'),
40- 'withholding_account_id': fields.many2one('account.account','Withholding account', help='Payable account used for amount due to tax authority', domain=[('type', '=', 'payable')]),
41- 'withholding_journal_id': fields.many2one('account.journal','Withholding journal', help="Journal used for registration of witholding amounts to be paid"),
42+ 'withholding_journal_id': fields.many2one('account.journal', 'Withholding journal', help="Journal used for registration of witholding amounts to be paid"),
43 }
44
45-class account_invoice(osv.osv):
46-
47- def _net_pay(self, cr, uid, ids, field_name, arg, context=None):
48- res = {}
49- for invoice in self.browse(cr, uid, ids, context):
50- res[invoice.id] = invoice.amount_total - invoice.withholding_amount
51- return res
52-
53- _inherit = "account.invoice"
54-
55+
56+class account_tax(osv.osv):
57+ _inherit = 'account.tax.code'
58 _columns = {
59- 'withholding_amount': fields.float('Withholding amount', digits_compute=dp.get_precision('Account'), readonly=True, states={'draft':[('readonly',False)]}),
60- 'has_withholding': fields.boolean('With withholding tax', readonly=True, states={'draft':[('readonly',False)]}),
61- 'net_pay': fields.function(_net_pay, string="Net Pay"),
62- }
63+ 'withholding_type': fields.boolean("Ritenuta d'acconto"),
64+ 'withholding_payment_term_id': fields.many2one('account.payment.term', "Termine di pagamento ritenuta d'acconto"),
65+ }
66+
67
68 class account_voucher(osv.osv):
69 _inherit = "account.voucher"
70@@ -55,84 +46,82 @@
71 _columns = {
72 'withholding_move_ids': fields.many2many('account.move', 'voucher_withholding_move_rel', 'voucher_id', 'move_id', 'Withholding Tax Entries', readonly=True),
73 }
74-
75+
76 def reconcile_withholding_move(self, cr, uid, invoice, wh_move, context=None):
77- line_pool=self.pool.get('account.move.line')
78+ line_pool = self.pool.get('account.move.line')
79 rec_ids = []
80 for inv_move_line in invoice.move_id.line_id:
81- if inv_move_line.account_id.type == 'payable' and not inv_move_line.reconcile_id:
82+ if inv_move_line.account_id.type == 'payable' and not inv_move_line.reconcile_id and inv_move_line.tax_code_id.withholding_type:
83 rec_ids.append(inv_move_line.id)
84 for wh_line in wh_move.line_id:
85- if wh_line.account_id.type == 'payable' and invoice.company_id.withholding_account_id and invoice.company_id.withholding_account_id.id != wh_line.account_id.id and not wh_line.reconcile_id:
86+ if wh_line.account_id.type == 'payable' and not wh_line.reconcile_id and wh_line.debit:
87 rec_ids.append(wh_line.id)
88 return line_pool.reconcile_partial(cr, uid, rec_ids, type='auto', context=context)
89-
90+
91 def action_move_line_create(self, cr, uid, ids, context=None):
92- res = super(account_voucher,self).action_move_line_create(cr, uid, ids, context)
93- inv_pool = self.pool.get('account.invoice')
94+ res = super(account_voucher, self).action_move_line_create(cr, uid, ids, context)
95 move_pool = self.pool.get('account.move')
96- tax_pool = self.pool.get('account.tax')
97 curr_pool = self.pool.get('res.currency')
98 term_pool = self.pool.get('account.payment.term')
99 for voucher in self.browse(cr, uid, ids, context):
100- amounts_by_invoice = super(account_voucher,self).allocated_amounts_grouped_by_invoice(cr, uid,voucher, context)
101- for inv_id in amounts_by_invoice:
102- invoice = inv_pool.browse(cr, uid, inv_id, context)
103- if invoice.withholding_amount:
104- # only for supplier payments
105- if voucher.type != 'payment':
106- raise osv.except_osv(_('Error'), _('Can\'t handle withholding tax with voucher of type other than payment'))
107- if not invoice.company_id.withholding_account_id:
108- raise osv.except_osv(_('Error'), _('The company does not have an associated Withholding account') )
109- if not invoice.company_id.withholding_payment_term_id:
110- raise osv.except_osv(_('Error'), _('The company does not have an associated Withholding Payment Term') )
111- if not invoice.company_id.withholding_journal_id:
112- raise osv.except_osv(_('Error'), _('The company does not have an associated Withholding journal') )
113- # compute the new amount proportionally to paid amount
114- new_line_amount = curr_pool.round(cr, uid, voucher.company_id.currency_id, ((amounts_by_invoice[invoice.id]['allocated'] + amounts_by_invoice[invoice.id]['write-off']) / invoice.net_pay) * invoice.withholding_amount)
115-
116- # compute the due date
117- due_list = term_pool.compute(
118- cr, uid, invoice.company_id.withholding_payment_term_id.id, new_line_amount,
119- date_ref=voucher.date or invoice.date_invoice, context=context)
120- if len(due_list) > 1:
121- raise osv.except_osv(_('Error'),
122- _('The payment term %s has too many due dates')
123- % invoice.company_id.withholding_payment_term_id.name)
124- if len(due_list) == 0:
125- raise osv.except_osv(_('Error'),
126- _('The payment term %s does not have due dates')
127- % invoice.company_id.withholding_payment_term_id.name)
128-
129- new_move = {
130- 'journal_id': invoice.company_id.withholding_journal_id.id,
131- 'line_id': [
132- (0,0,{
133- 'name': invoice.number,
134- 'account_id': invoice.account_id.id,
135- 'debit': new_line_amount,
136- 'credit': 0.0,
137- }),
138- (0,0,{
139- 'name': _('Payable withholding - ') + invoice.number,
140- 'account_id': invoice.company_id.withholding_account_id.id,
141- 'debit': 0.0,
142- 'credit': new_line_amount,
143- 'date_maturity': due_list[0][0],
144- }),
145- ]
146- }
147- move_id = self.pool.get('account.move').create(cr, uid, new_move, context=context)
148- self.reconcile_withholding_move(cr, uid, invoice, move_pool.browse(cr, uid, move_id, context), context)
149- voucher.write({'withholding_move_ids': [(4, move_id)]})
150+ for line in voucher.line_ids:
151+ if line.amount and line.move_line_id and line.move_line_id.invoice and not line.move_line_id.tax_code_id.id:
152+ invoice = line.move_line_id.invoice
153+ for inv_tax_line in line.move_line_id.invoice.invoice_line:
154+ for tax_line in inv_tax_line.invoice_line_tax_id:
155+ if tax_line.tax_code_id.withholding_type:
156+ if voucher.type != 'payment':
157+ raise osv.except_osv(_('Error'), _('Can\'t handle withholding tax with voucher of type other than payment'))
158+ if not tax_line.tax_code_id.withholding_payment_term_id:
159+ raise osv.except_osv(_('Error'), _('The tax does not have an associated Withholding Payment Term'))
160+ if not invoice.company_id.withholding_journal_id:
161+ raise osv.except_osv(_('Error'), _('The company does not have an associated Withholding journal'))
162+ due_list = term_pool.compute(
163+ cr, uid, tax_line.tax_code_id.withholding_payment_term_id.id, line.amount,
164+ date_ref=voucher.date or invoice.date_invoice, context=context)
165+ if len(due_list) > 1:
166+ raise osv.except_osv(
167+ _('Error'),
168+ _('The payment term %s has too many due dates')
169+ % tax_line.tax_code_id.withholding_payment_term_id.name)
170+ if len(due_list) == 0:
171+ raise osv.except_osv(
172+ _('Error'),
173+ _('The payment term %s does not have due dates')
174+ % tax_line.tax_code_id.withholding_payment_term_id.name)
175+ # compute the amount of withholding tax to pay, proportionally to paid amount
176+ new_line_amount = curr_pool.round(cr, uid, voucher.company_id.currency_id, (
177+ line.amount/invoice.amount_total * inv_tax_line.price_subtotal * - tax_line.amount)
178+ )
179+ new_move = {
180+ 'journal_id': invoice.company_id.withholding_journal_id.id,
181+ 'line_id': [
182+ (0, 0, {
183+ 'name': _('Giro contabile ritenuta acconto - ') + invoice.number,
184+ 'account_id': tax_line.account_collected_id.id,
185+ 'debit': new_line_amount,
186+ 'credit': 0.0,
187+ }),
188+ (0, 0, {
189+ 'name': _('Giro contabile ritenuta acconto - ') + invoice.number,
190+ 'account_id': tax_line.account_collected_id.id,
191+ 'debit': 0.0,
192+ 'credit': new_line_amount,
193+ 'date_maturity': due_list[0][0],
194+ 'partner_id': invoice.partner_id.id,
195+ }),
196+ ]
197+ }
198+ move_id = self.pool.get('account.move').create(cr, uid, new_move, context=context)
199+ self.reconcile_withholding_move(
200+ cr, uid, invoice, move_pool.browse(cr, uid, move_id, context), context)
201+ voucher.write({'withholding_move_ids': [(4, move_id)]})
202 return res
203
204 def cancel_voucher(self, cr, uid, ids, context=None):
205- res = super(account_voucher,self).cancel_voucher(cr, uid, ids, context)
206- reconcile_pool = self.pool.get('account.move.reconcile')
207+ res = super(account_voucher, self).cancel_voucher(cr, uid, ids, context)
208 move_pool = self.pool.get('account.move')
209 for voucher in self.browse(cr, uid, ids, context=context):
210- recs = []
211 for move in voucher.withholding_move_ids:
212 move_pool.button_cancel(cr, uid, [move.id])
213 move_pool.unlink(cr, uid, [move.id])
214
215=== modified file 'l10n_it_withholding_tax/account_view.xml'
216--- l10n_it_withholding_tax/account_view.xml 2012-10-26 12:17:14 +0000
217+++ l10n_it_withholding_tax/account_view.xml 2013-10-16 21:46:08 +0000
218@@ -12,46 +12,12 @@
219 <field name="arch" type="xml">
220 <field name="paypal_account" position="after">
221 <separator colspan="4"></separator>
222- <field name="withholding_payment_term_id"/>
223- <field name="withholding_account_id"/>
224 <field name="withholding_journal_id" />
225 <separator colspan="4"></separator>
226 </field>
227 </field>
228 </record>
229
230- <!-- invoice -->
231-
232- <record id="invoice_supplier_form" model="ir.ui.view">
233- <field name="name">account.invoice.supplier.form</field>
234- <field name="model">account.invoice</field>
235- <field name="type">form</field>
236- <field name="inherit_id" ref="account.invoice_supplier_form"/>
237- <field name="arch" type="xml">
238- <field name="date_due" position="after">
239- <field name="has_withholding"/>
240- </field>
241- <field name="amount_total" position="after">
242- <field name="withholding_amount" attrs="{'invisible': [('has_withholding', '=', False)]}"/>
243- <field name="net_pay" attrs="{'invisible': [('has_withholding', '=', False)]}"/>
244- </field>
245- </field>
246- </record>
247-
248- <!-- voucher -->
249-
250- <record id="view_vendor_payment_form_wh_move" model="ir.ui.view">
251- <field name="name">account.voucher.payment.form.wh.move</field>
252- <field name="model">account.voucher</field>
253- <field name="type">form</field>
254- <field name="inherit_id" ref="account_voucher.view_vendor_payment_form"/>
255- <field name="arch" type="xml">
256- <field name="move_ids" position="after">
257- <separator string="Withholding tax entries" colspan="4"></separator>
258- <field name="withholding_move_ids" colspan="4" nolabel="1"/>
259- </field>
260- </field>
261- </record>
262-
263+
264 </data>
265 </openerp>
266
267=== added file 'l10n_it_withholding_tax/tax_view.xml'
268--- l10n_it_withholding_tax/tax_view.xml 1970-01-01 00:00:00 +0000
269+++ l10n_it_withholding_tax/tax_view.xml 2013-10-16 21:46:08 +0000
270@@ -0,0 +1,18 @@
271+<?xml version="1.0" ?>
272+<openerp>
273+ <data>
274+
275+ <record id="view_tax_code_form_whtax" model="ir.ui.view">
276+ <field name="name">account.tax.code.form</field>
277+ <field name="model">account.tax.code</field>
278+ <field name="inherit_id" ref="account.view_tax_code_form"/>
279+ <field name="arch" type="xml">
280+ <field name="parent_id" position="after">
281+ <field name="withholding_type"/>
282+ <field name="withholding_payment_term_id"/>
283+ </field>
284+ </field>
285+ </record>
286+
287+ </data>
288+</openerp>

Subscribers

People subscribed via source and target branches