OCA / OpenUpgrade

Open source upgrade path for Odoo/OpenERP
https://oca.github.io/OpenUpgrade/
GNU Affero General Public License v3.0
722 stars 690 forks source link

Payment Acquriers 12.0 -> 13.0 #2814

Closed haydnjonesdesign closed 3 years ago

haydnjonesdesign commented 3 years ago

Hi guys.

I'm having a hell of a time migrating from 12 to 13. Only using stock modules/addons so I'm hoping it wouldn't be much of an issue.

At the moment the show stopper is an issue with payment acquirers where by it looks like there are a few new acquiriers in 13.0 and the migration script is erroring on updating a record that doesn't exist.

Whats the best method of resolving this? Trying to manually add the missing aquirers to 12.0?

Error code below.

2021-07-12 08:29:37,028 1757 ERROR odoo odoo.modules.registry: Failed to load registry 
Traceback (most recent call last):
  File "/mnt/oca/odoo/modules/registry.py", line 60, in __new__
    return cls.registries[db_name]
  File "/mnt/oca/odoo/tools/func.py", line 69, in wrapper
    return func(self, *args, **kwargs)
  File "/mnt/oca/odoo/tools/lru.py", line 44, in __getitem__
    a = self.d[obj].me
KeyError: 'odoo'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/mnt/oca/odoo/tools/cache.py", line 85, in lookup
    r = d[key]
  File "/mnt/oca/odoo/tools/func.py", line 69, in wrapper
    return func(self, *args, **kwargs)
  File "/mnt/oca/odoo/tools/lru.py", line 44, in __getitem__
    a = self.d[obj].me
KeyError: ('ir.model.data', <function IrModelData.xmlid_lookup at 0x7fefc09d4268>, 'base.module_payment_payulatam')

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/mnt/oca/odoo/tools/convert.py", line 717, in parse
    self._tag_root(de)
  File "/mnt/oca/odoo/tools/convert.py", line 679, in _tag_root
    f(rec)
  File "/mnt/oca/odoo/tools/convert.py", line 566, in _tag_record
    f_val = self.id_get(f_ref)
  File "/mnt/oca/odoo/tools/convert.py", line 662, in id_get
    res = self.model_id_get(id_str, raise_if_not_found)
  File "/mnt/oca/odoo/tools/convert.py", line 668, in model_id_get
    return self.env['ir.model.data'].xmlid_to_res_model_res_id(id_str, raise_if_not_found=raise_if_not_found)
  File "/mnt/oca/odoo/addons/base/models/ir_model.py", line 1715, in xmlid_to_res_model_res_id
    return self.xmlid_lookup(xmlid)[1:3]
  File "<decorator-gen-26>", line 2, in xmlid_lookup
  File "/mnt/oca/odoo/tools/cache.py", line 90, in lookup
    value = d[key] = self.method(*args, **kwargs)
  File "/mnt/oca/odoo/addons/base/models/ir_model.py", line 1704, in xmlid_lookup
    raise ValueError('External ID not found in the system: %s' % xmlid)
ValueError: External ID not found in the system: base.module_payment_payulatam

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/mnt/oca/odoo/modules/registry.py", line 86, in new
    odoo.modules.load_modules(registry._db, force_demo, status, update_module)
  File "/mnt/oca/odoo/modules/loading.py", line 484, in load_modules
    force, status, report, loaded_modules, update_module, models_to_check, upg_registry)
  File "/mnt/oca/odoo/modules/loading.py", line 368, in load_marked_modules
    upg_registry=upg_registry,
  File "/mnt/oca/odoo/modules/loading.py", line 248, in load_module_graph
    load_data(cr, idref, mode, kind='data', package=package, report=report)
  File "/mnt/oca/odoo/modules/loading.py", line 72, in load_data
    tools.convert_file(cr, package.name, filename, idref, mode, noupdate, kind, report)
  File "/mnt/oca/odoo/tools/convert.py", line 741, in convert_file
    convert_xml_import(cr, module, fp, idref, mode, noupdate, report)
  File "/mnt/oca/odoo/tools/convert.py", line 808, in convert_xml_import
    obj.parse(doc.getroot())
  File "/mnt/oca/odoo/tools/convert.py", line 726, in parse
    exc_info[2]
  File "/mnt/oca/odoo/tools/pycompat.py", line 13, in reraise
    raise value.with_traceback(tb)
  File "/mnt/oca/odoo/tools/convert.py", line 717, in parse
    self._tag_root(de)
  File "/mnt/oca/odoo/tools/convert.py", line 679, in _tag_root
    f(rec)
  File "/mnt/oca/odoo/tools/convert.py", line 566, in _tag_record
    f_val = self.id_get(f_ref)
  File "/mnt/oca/odoo/tools/convert.py", line 662, in id_get
    res = self.model_id_get(id_str, raise_if_not_found)
  File "/mnt/oca/odoo/tools/convert.py", line 668, in model_id_get
    return self.env['ir.model.data'].xmlid_to_res_model_res_id(id_str, raise_if_not_found=raise_if_not_found)
  File "/mnt/oca/odoo/addons/base/models/ir_model.py", line 1715, in xmlid_to_res_model_res_id
    return self.xmlid_lookup(xmlid)[1:3]
  File "<decorator-gen-26>", line 2, in xmlid_lookup
  File "/mnt/oca/odoo/tools/cache.py", line 90, in lookup
    value = d[key] = self.method(*args, **kwargs)
  File "/mnt/oca/odoo/addons/base/models/ir_model.py", line 1704, in xmlid_lookup
    raise ValueError('External ID not found in the system: %s' % xmlid)
odoo.tools.convert.ParseError: "External ID not found in the system: base.module_payment_payulatam" while parsing /mnt/oca/addons/payment/data/payment_acquirer_data.xml:2, near
<odoo noupdate="1">

    <record id="payment_acquirer_buckaroo" model="payment.acquirer">
        <field name="name">Buckaroo</field>
        <field name="display_as">Credit Card (powered by Buckaroo)</field>
        <field name="image_128" type="base64" file="payment_buckaroo/static/src/img/buckaroo_icon.png"/>
        <field name="view_template_id" ref="default_acquirer_button"/>
        <field name="module_id" ref="base.module_payment_buckaroo"/>
        <field name="description" type="html">
            <p>
                A payment gateway to accept online payments via credit cards.
            </p>
            <ul class="list-inline">
                <li class="list-inline-item"><i class="fa fa-check"/>Online Payment</li>
                <li class="list-inline-item"><i class="fa fa-check"/>Payment Status Tracking</li>
            </ul>
        </field>
        <!-- https://www.buckaroo-payments.com/products/payment-methods/ -->
        <field name="payment_icon_ids" eval="[(6, 0, [ref(&quot;payment.payment_icon_cc_bancontact&quot;),                                                         ref(&quot;payment.payment_icon_cc_maestro&quot;),                                                         ref(&quot;payment.payment_icon_cc_mastercard&quot;),                                                         ref(&quot;payment.payment_icon_cc_visa&quot;),                                                         ref(&quot;payment.payment_icon_cc_american_express&quot;)])]"/>
    </record>

    <record id="payment_acquirer_ingenico" model="payment.acquirer">
        <field name="name">Ingenico</field>
        <field name="display_as">Credit Card (powered by Ingenico)</field>
        <field name="sequence">2</field>
        <field name="view_template_id" ref="default_acquirer_button"/>
        <field name="image_128" type="base64" file="payment_ingenico/static/src/img/ingenico_icon.png"/>
        <field name="module_id" ref="base.module_payment_ingenico"/>
        <field name="description" type="html">
            <p>
                Ingenico Payment Services (formerly Ogone) supports a wide range of payment methods: credit cards, debit cards, bank transfers, Bancontact, iDeal, Giropay.
            </p>
            <ul class="list-inline">
                <li class="list-inline-item"><i class="fa fa-check"/>Online Payment</li>
                <li class="list-inline-item"><i class="fa fa-check"/>Payment Status Tracking</li>
                <li class="list-inline-item"><i class="fa fa-check"/>Subscriptions</li>
                <li class="list-inline-item"><i class="fa fa-check"/>Save Cards</li>
                <li class="list-inline-item"><i class="fa fa-check"/>Embedded Credit Card Form</li>
            </ul>
        </field>
        <!-- https://payment-services.ingenico.com/~/media/files/130806_product_sheet_ingenico_collect_en.ashx?la=en -->
        <field name="payment_icon_ids" eval="[(6, 0, [ref(&quot;payment.payment_icon_cc_ideal&quot;),                                                         ref(&quot;payment.payment_icon_cc_bancontact&quot;),                                                         ref(&quot;payment.payment_icon_cc_maestro&quot;),                                                         ref(&quot;payment.payment_icon_cc_mastercard&quot;),                                                         ref(&quot;payment.payment_icon_cc_visa&quot;)])]"/>
    </record>

    <record id="payment_acquirer_adyen" model="payment.acquirer">
        <field name="name">Adyen</field>
        <field name="display_as">Credit Card (powered by Adyen)</field>
        <field name="view_template_id" ref="default_acquirer_button"/>
        <field name="image_128" type="base64" file="payment_adyen/static/src/img/adyen_icon.png"/>
        <field name="module_id" ref="base.module_payment_adyen"/>
        <field name="description" type="html">
            <p>
                A payment gateway to accept online payments via credit cards, debit cards and bank transfers.
            </p>
            <ul class="list-inline">
                <li class="list-inline-item"><i class="fa fa-check"/>Online Payment</li>
                <li class="list-inline-item"><i class="fa fa-check"/>Payment Status Tracking</li>
            </ul>
        </field>
        <!-- https://www.adyen.com/payment-methods -->
        <field name="payment_icon_ids" eval="[(6, 0, [ref(&quot;payment.payment_icon_cc_bancontact&quot;),                                                         ref(&quot;payment.payment_icon_cc_maestro&quot;),                                                         ref(&quot;payment.payment_icon_cc_mastercard&quot;),                                                         ref(&quot;payment.payment_icon_cc_visa&quot;),                                                         ref(&quot;payment.payment_icon_cc_discover&quot;),                                                         ref(&quot;payment.payment_icon_cc_diners_club_intl&quot;),                                                         ref(&quot;payment.payment_icon_cc_jcb&quot;),                                                         ref(&quot;payment.payment_icon_cc_unionpay&quot;)])]"/>
    </record>

    <record id="payment_acquirer_authorize" model="payment.acquirer">
        <field name="name">Authorize.net</field>
        <field name="display_as">Credit Card (powered by Authorize)</field>
        <field name="sequence">3</field>
        <field name="view_template_id" ref="default_acquirer_button"/>
        <field name="image_128" type="base64" file="payment_authorize/static/src/img/authorize_icon.png"/>
        <field name="module_id" ref="base.module_payment_authorize"/>
        <field name="description" type="html">
            <p>
                A payment gateway to accept online payments via credit cards and e-checks.
            </p>
            <ul class="list-inline">
                <li class="list-inline-item"><i class="fa fa-check"/>Online Payment</li>
                <li class="list-inline-item"><i class="fa fa-check"/>Payment Status Tracking</li>
                <li class="list-inline-item"><i class="fa fa-check"/>Subscriptions</li>
                <li class="list-inline-item"><i class="fa fa-check"/>Save Cards</li>
                <li class="list-inline-item"><i class="fa fa-check"/>Manual Capture</li>
                <li class="list-inline-item"><i class="fa fa-check"/>Embedded Credit Card Form</li>
            </ul>
        </field>
        <!-- https://www.authorize.net/solutions/merchantsolutions/onlinemerchantaccount/ -->
        <field name="payment_icon_ids" eval="[(6, 0, [ref(&quot;payment.payment_icon_cc_maestro&quot;),                                                         ref(&quot;payment.payment_icon_cc_mastercard&quot;),                                                         ref(&quot;payment.payment_icon_cc_discover&quot;),                                                         ref(&quot;payment.payment_icon_cc_diners_club_intl&quot;),                                                         ref(&quot;payment.payment_icon_cc_jcb&quot;),                                                         ref(&quot;payment.payment_icon_cc_visa&quot;)])]"/>
    </record>

    <record id="payment_acquirer_transfer" model="payment.acquirer">
        <field name="name">Wire Transfer</field>
        <field name="sequence">2</field>
        <field name="view_template_id" ref="default_acquirer_button"/>
        <field name="image_128" type="base64" file="payment_transfer/static/src/img/transfer_icon.png"/>
        <field name="module_id" ref="base.module_payment_transfer"/>
        <field name="pending_msg">&lt;i&gt;Pending&lt;/i&gt;... The order will be validated after the payment.</field>
        <field name="description" type="html">
            <p>
                Provide instructions to customers so that they can pay their orders manually.
            </p>
        </field>
    </record>

    <record id="payment_acquirer_sips" model="payment.acquirer">
        <field name="name">Sips</field>
        <field name="display_as">Credit Card (powered by Sips)</field>
        <field name="view_template_id" ref="default_acquirer_button"/>
        <field name="image_128" type="base64" file="payment_sips/static/src/img/sips_icon.png"/>
        <field name="module_id" ref="base.module_payment_sips"/>
        <field name="description" type="html">
            <p>
                A payment gateway from Atos Worldline to accept online payments via credit cards.
            </p>
            <ul class="list-inline">
                <li class="list-inline-item"><i class="fa fa-check"/>Online Payment</li>
                <li class="list-inline-item"><i class="fa fa-check"/>Payment Status Tracking</li>
            </ul>
        </field>
        <!-- http://sips.worldline.com/en-us/home/features/payment-types-and-acquirers.html -->
        <field name="payment_icon_ids" eval="[(6, 0, [ref(&quot;payment.payment_icon_cc_maestro&quot;),                                                         ref(&quot;payment.payment_icon_cc_mastercard&quot;),                                                         ref(&quot;payment.payment_icon_cc_discover&quot;),                                                         ref(&quot;payment.payment_icon_cc_diners_club_intl&quot;),                                                         ref(&quot;payment.payment_icon_cc_jcb&quot;),                                                         ref(&quot;payment.payment_icon_cc_american_express&quot;),                                                         ref(&quot;payment.payment_icon_cc_bancontact&quot;),                                                         ref(&quot;payment.payment_icon_cc_unionpay&quot;),                                                         ref(&quot;payment.payment_icon_cc_visa&quot;)])]"/>
    </record>

    <record id="payment_acquirer_paypal" model="payment.acquirer">
        <field name="name">PayPal</field>
        <field name="sequence">1</field>
        <field name="view_template_id" ref="default_acquirer_button"/>
        <field name="image_128" type="base64" file="payment_paypal/static/src/img/paypal_icon.png"/>
        <field name="module_id" ref="base.module_payment_paypal"/>
        <field name="description" type="html">
            <p>
                PayPal is the easiest way to accept payments via Paypal or credit cards.
            </p>
            <ul class="list-inline">
                <li class="list-inline-item"><i class="fa fa-check"/>Online Payment</li>
                <li class="list-inline-item"><i class="fa fa-check"/>Payment Status Tracking</li>
            </ul>
        </field>
        <!-- https://www.paypal.com/us/selfhelp/article/Which-credit-cards-can-I-accept-with-PayPal-Merchant-Services-FAQ1525#business -->
        <field name="payment_icon_ids" eval="[(6, 0, [ref(&quot;payment.payment_icon_cc_maestro&quot;),                                                         ref(&quot;payment.payment_icon_cc_mastercard&quot;),                                                         ref(&quot;payment.payment_icon_cc_discover&quot;),                                                         ref(&quot;payment.payment_icon_cc_diners_club_intl&quot;),                                                         ref(&quot;payment.payment_icon_cc_jcb&quot;),                                                         ref(&quot;payment.payment_icon_cc_american_express&quot;),                                                         ref(&quot;payment.payment_icon_cc_unionpay&quot;),                                                         ref(&quot;payment.payment_icon_cc_visa&quot;)])]"/>
    </record>

    <record id="payment_acquirer_stripe" model="payment.acquirer">
        <field name="name">Stripe</field>
        <field name="display_as">Credit Card (powered by Stripe)</field>
        <field name="view_template_id" ref="default_acquirer_button"/>
        <field name="image_128" type="base64" file="payment_stripe/static/src/img/stripe_icon.png"/>
        <field name="module_id" ref="base.module_payment_stripe"/>
        <field name="description" type="html">
            <p>
                A payment gateway to accept online payments via credit cards.
            </p>
            <ul class="list-inline">
                <li class="list-inline-item"><i class="fa fa-check"/>Online Payment</li>
                <li class="list-inline-item"><i class="fa fa-check"/>Payment Status Tracking</li>
                <li class="list-inline-item"><i class="fa fa-check"/>Subscriptions</li>
                <li class="list-inline-item"><i class="fa fa-check"/>Save Cards</li>
            </ul>
        </field>
        <!--
            https://stripe.com/payments/payment-methods-guide
            https://support.goteamup.com/hc/en-us/articles/115002089349-Which-cards-and-payment-types-can-I-accept-with-Stripe-
        -->
        <field name="payment_icon_ids" eval="[(6, 0, [ref(&quot;payment.payment_icon_cc_maestro&quot;),                                                         ref(&quot;payment.payment_icon_cc_mastercard&quot;),                                                         ref(&quot;payment.payment_icon_cc_discover&quot;),                                                         ref(&quot;payment.payment_icon_cc_diners_club_intl&quot;),                                                         ref(&quot;payment.payment_icon_cc_jcb&quot;),                                                         ref(&quot;payment.payment_icon_cc_american_express&quot;),                                                         ref(&quot;payment.payment_icon_cc_visa&quot;)])]"/>
    </record>

    <record id="payment_acquirer_payu" model="payment.acquirer">
        <field name="name">PayUmoney</field>
        <field name="display_as">Credit Card (powered by PayUmoney)</field>
        <field name="image_128" type="base64" file="payment_payumoney/static/src/img/payumoney_icon.png"/>
        <field name="view_template_id" ref="default_acquirer_button"/>
        <field name="module_id" ref="base.module_payment_payumoney"/>
        <field name="description" type="html">
            <p>
                PayU India is an online payments solutions company serving the Indian market.
            </p>
            <ul class="list-inline">
                <li class="list-inline-item"><i class="fa fa-check"/>Online Payment</li>
                <li class="list-inline-item"><i class="fa fa-check"/>Payment Status Tracking</li>
            </ul>
        </field>
        <!-- https://www.payumoney.com/selfcare.html?userType=seller
            > Banks & Cards > What options do you have in the Credit Card payment?
         -->
        <field name="payment_icon_ids" eval="[(6, 0, [ref(&quot;payment.payment_icon_cc_maestro&quot;),                                                         ref(&quot;payment.payment_icon_cc_mastercard&quot;),                                                         ref(&quot;payment.payment_icon_cc_american_express&quot;),                                                         ref(&quot;payment.payment_icon_cc_visa&quot;)])]"/>
    </record>

    <record id="payment_acquirer_payulatam" model="payment.acquirer">
        <field name="name">PayU Latam</field>
        <field name="display_as">Credit Card (powered by PayU Latam)</field>
        <field name="image_128" type="base64" file="payment_payulatam/static/src/img/payulatam_icon.png"/>
        <field name="view_template_id" ref="default_acquirer_button"/>
        <field name="module_id" ref="base.module_payment_payulatam"/>
        <field name="description" type="html">
            <p>
                PayU is a leading financial services provider in Colombia, Argentina, Brazil, Chile, Mexico, Panama, and Peru. It allows merchant to accept local payments with just one account and integration.
            </p>
            <ul class="list-inline">
                <li class="list-inline-item"><i class="fa fa-check"/>Online Payment</li>
                <li class="list-inline-item"><i class="fa fa-check"/>Payment Status Tracking</li>
            </ul>
        </field>
        <!-- https://www.payulatam.com/medios-de-pago/ -->
        <field name="payment_icon_ids" eval="[(6, 0, [ref(&quot;payment.payment_icon_cc_diners_club_intl&quot;),                                                         ref(&quot;payment.payment_icon_cc_mastercard&quot;),                                                         ref(&quot;payment.payment_icon_cc_american_express&quot;),                                                         ref(&quot;payment.payment_icon_cc_visa&quot;),                                                         ref(&quot;payment.payment_icon_cc_codensa_easy_credit&quot;)])]"/>
    </record>

    <record id="payment_acquirer_alipay" model="payment.acquirer">
        <field name="name">Alipay</field>
        <field name="display_as">Credit Card (powered by Alipay)</field>
        <field name="image_128" type="base64" file="payment_alipay/static/description/icon.png"/>
        <field name="view_template_id" ref="default_acquirer_button"/>
        <field name="module_id" ref="base.module_payment_alipay"/>
        <field name="description" type="html">
            <p>
                Alipay is the most popular online payment platform in China. Chinese consumers can buy online using their Alipay eWallet.
            </p>
            <ul class="list-inline">
                <li><i class="fa fa-check"/>Online Payment</li>
                <li><i class="fa fa-check"/>Payment Status Tracking</li>
            </ul>
        </field>
        <!-- https://intl.alipay.com/ihome/home/about/buy.htm?topic=paymentMethods -->
        <field name="payment_icon_ids" eval="[(6, 0, [ref(&quot;payment.payment_icon_cc_jcb&quot;),ref(&quot;payment.payment_icon_cc_mastercard&quot;),ref(&quot;payment.payment_icon_cc_western_union&quot;),ref(&quot;payment.payment_icon_cc_webmoney&quot;),ref(&quot;payment.payment_icon_cc_visa&quot;)])]"/>
    </record>

    <record id="payment.payment_acquirer_sepa_direct_debit" model="payment.acquirer">
        <field name="name">SEPA Direct Debit</field>
        <field name="view_template_id" ref="default_acquirer_button"/>
        <field name="image_128" type="base64" file="base/static/img/icons/payment_sepa_direct_debit.png"/>
        <field name="module_id" ref="base.module_payment_sepa_direct_debit"/>
        <field name="description" type="html">
            <p>
                SEPA Direct Debit is a Europe-wide Direct Debit system that allows merchants to collect Euro-denominated payments from accounts in the 34 SEPA countries and associated territories.
            </p>
        </field>
    </record>

</odoo>
pedrobaeza commented 3 years ago

This is something not reproducible in my end. Are you limiting the addons on your scope? Anyways, it's not an issue, so I converted to a question.