Commits

Jesús Martín (Zikzakmedia) committed 294d416

Fixed the addition of default values for some account tax template records.

Comments (0)

Files changed (1)

OpenERP_XML_2_Tryton.py

         if field.attrib.get('name') == 'account_paid_id':
             return False
     if 'compras' in oerp_record.attrib.get('id') or \
-            oerp_record.attrib.get('id') == 'iva_sop_ex':
+            oerp_record.attrib.get('id') == 'iva_sop_ex' or \
+            oerp_record.attrib.get('id') == 'iva_pymes_sop_ex':
         return 'pymes' in file_name \
             and {'name': 'credit_note_account', 'ref': 'pgc_pymes_4700_child'} \
             or {'name': 'credit_note_account', 'ref': 'pgc_4700_child'}
     for field in oerp_record.getchildren():
         if field.attrib.get('name') == 'account_collected_id':
             return False
-    if 'compras' in oerp_record.attrib.get('id'):
+    if 'compras' in oerp_record.attrib.get('id') or \
+            oerp_record.attrib.get('id') == 'iva_sop_ex' or \
+            oerp_record.attrib.get('id') == 'iva_pymes_sop_ex':
         return 'pymes' in file_name \
             and {'name': 'invoice_account', 'ref': 'pgc_pymes_4700_child'} \
             or {'name': 'invoice_account', 'ref': 'pgc_4700_child'}
                     if text_value:
                         tryton_xml_field.text = text_value
     tryton_xml_data = etree.ElementTree(tryton_xml)
-    print target_file
     tryton_xml_data.write(target_file, encoding='UTF-8', method='xml',
         pretty_print=True)