connector-magento icon indicating copy to clipboard operation
connector-magento copied to clipboard

[8.0] Migration of magentorepconnect_order_comment

Open hugosantosred opened this issue 10 years ago • 4 comments

Migrated module magentoerpconnect_order_comment to version 8.0 with new API

hugosantosred avatar Nov 17 '15 11:11 hugosantosred

Only a small remark regarding a correction with _(), apart that, that's fine!

Thanks :+1:

guewen avatar Nov 17 '15 12:11 guewen

I didn't know that about help on fields and translations. Thanks! @guewen

hugosantosred avatar Nov 17 '15 12:11 hugosantosred

Can you catch ImportError for the import of bs4 and then at runtime (in a method where you use the import) check if bs4 is defined, and raise then?

try:
    from bs4 import BeautifulSoup
except ImportError:
    BeautifulSoup = False

...

    if not BeautifulSoup:
        raise ....
    return {'comment': BeautifulSoup(comment).get_text()}

StefanRijnhart avatar Feb 12 '16 10:02 StefanRijnhart

You seem to miss https://github.com/OCA/connector-magento/commit/0ead0327ecc2, and I think you would need to take the i18n directory as well.

StefanRijnhart avatar Feb 12 '16 11:02 StefanRijnhart