~unifield-team/unifield-addons/trunk

« back to all changes in this revision

Viewing changes to account/invoice.py

  • Committer: jf
  • Date: 2015-05-28 14:38:20 UTC
  • mfrom: (4656.4.2 unifield-addons)
  • Revision ID: jfb@tempo-consulting.fr-20150528143820-0pimvfysicmbgtwi
BKLG-81 [FIX] Supplier Refunds: change label to 'Amount to be refunded'
BKLG-48 [FIX] Supplier Refunds opened from res.log: change view title
lp:~os-1/unifield-addons/BKLG-48

Show diffs side-by-side

added added

removed removed

Lines of Context:
337
337
                journal_select = journal_obj._name_search(cr, uid, '', [('type', '=', type)], context=context, limit=None, name_get_uid=1)
338
338
                res['fields'][field]['selection'] = journal_select
339
339
 
 
340
        if view_type == 'form' and context.get('type', 'out_invoice') == 'in_refund':
 
341
            doc = etree.XML(res['arch'])
 
342
            doc.attrib['string'] = _('Supplier Refund')
 
343
            nodes = doc.xpath("//field[@name='amount_to_pay']")
 
344
            for node in nodes:
 
345
                node.set('string', _('Amount to be refunded'))
 
346
            res['arch'] = etree.tostring(doc)
 
347
 
340
348
        if view_type == 'tree':
341
349
            doc = etree.XML(res['arch'])
342
350
            nodes = doc.xpath("//field[@name='partner_id']")
862
870
 
863
871
            # one move line per tax line
864
872
            iml += ait_obj.move_line_get(cr, uid, inv.id)
865
 
            # UFTP-380: If the name is empty or a space character, by default it is set to '/', otherwise it will cause problem for the sync on destination instance 
 
873
            # UFTP-380: If the name is empty or a space character, by default it is set to '/', otherwise it will cause problem for the sync on destination instance
866
874
            for il in iml:
867
875
                if not il['name']:
868
876
                    il['name'] = '/'