Kaynağa Gözat

Add files via upload

Tech Consulting 2 yıl önce
ebeveyn
işleme
4c59a6a9fd

+ 1 - 1
custom_supplier_cfdi_data/__manifest__.py

@@ -12,7 +12,7 @@
     'website': "http://www.m22.mx",
     'category': 'Contabilidad',
     'version': '14.0.1',
-    'depends': ['base','l10n_mx_edi'],
+    'depends': ['base','l10n_mx_edi','l10n_mx_edi_40'],
     'data': ['views/res_company.xml'],
     'license': 'AGPL-3'
 

BIN
custom_supplier_cfdi_data/__pycache__/__init__.cpython-37.pyc


BIN
custom_supplier_cfdi_data/models/__pycache__/__init__.cpython-37.pyc


BIN
custom_supplier_cfdi_data/models/__pycache__/account_edi_format.cpython-37.pyc


BIN
custom_supplier_cfdi_data/models/__pycache__/res_company.cpython-37.pyc


+ 6 - 0
custom_supplier_cfdi_data/models/account_edi_format.py

@@ -9,4 +9,10 @@ class AccountEdiFormat(models.Model):
         res = super(AccountEdiFormat, self)._l10n_mx_edi_get_common_cfdi_values(move)
         if move.company_id.x_commercial_partner_id:
             res["supplier"] = move.company_id.x_commercial_partner_id
+        return res
+
+    def _l10n_mx_edi_get_40_values(self, move):
+        res = super(AccountEdiFormat, self)._l10n_mx_edi_get_40_values(move)
+        if move.company_id.x_commercial_partner_id:
+            res["supplier_name"] = str(move.company_id.x_commercial_partner_id.name).strip()
         return res