OCA / edi

GNU Affero General Public License v3.0
121 stars 308 forks source link

weboob: Extract weboob config to separate module #89

Closed rousseldenis closed 2 years ago

rousseldenis commented 5 years ago

@alexis-via I'm currently writing weboob modules for personal use (Belgium providers) and I'm asking myself if the weboob functionnality shouldn't be extracted in a separate module as you can parse different kind of websites to get invoices, purchases, ...

Is that acceptable for you if I do it in v11 ?

Moreover, I think the 'unece' should be externalized too (pulled by base_business_document_import).

alexis-via commented 5 years ago

@rousseldenis Glad to see that you are playing with weboob :) I was talking about weboob with my collegues @bguillot and @florian-dacosta this morning, saying that we should try to learn how to develop a weboob module to download invoice (I haven't tried it myself yet).

I don't understand your point about weboob extracted in a "separate" module : weboob already has it's own module account_invoice_download_weboob and weboob itself is an external python lib. So I don't really see what more we could extract. Maybe you mean that the module "account_invoice_download" should handle both invoices and purchase orders... is it what you mean ?

About unece : I don't think it's a problem that base_business_document_import pulls unece. These unece are small modules that just provide fields and data, nothing more. If you don't need them, they won't "bother" you. And I hope that this kind of data will become native in Odoo v13 or v14, so that we won't have to maintain these modules in OCA any more.

rousseldenis commented 5 years ago

@alexis-via I wanted to put this implementation of weboob in Odoo https://github.com/OCA/edi/blob/230059476c7bde47978d0fa1942d18f48951b96c/account_invoice_download_weboob/models/weboob_module.py#L18 in a separate module.

And maybe abstracting this too : https://github.com/OCA/edi/blob/10.0/account_invoice_download_weboob/models/account_invoice_download_config.py

For 'unece', it was just a question on dependency, but if it will be standard, ...

alexis-via commented 5 years ago

Yes, why not...

For curiosity, do you really have a real-life scenario where you would have to auto-download sale orders (in your first comment, you mentioned purchase orders... but it doesn't really make sense to get a PO from a remote location !) from a remote website ? It is very common for invoices (electricity bill, phone bill, Internet bill, ...), but I don't see this kind of scenario for sale orders: usually, the customer pushes the sale order to this supplier, he doesn't wait for him to come and get it from his web portal. I'm not against splitting the module in 2, but if it doesn't correspond to any real-life scenario, I think it's not worth the effort. We'd better invest the equivalent effort in improving the module or developping additional weboob invoice modules !

rousseldenis commented 5 years ago

It was an example. But, the idea was not limiting weboob usage to invoices as it can parse almost everything.

alexis-via commented 4 years ago

If you do this extraction, I'll approve your PR :)

github-actions[bot] commented 2 years ago

There hasn't been any activity on this issue in the past 6 months, so it has been marked as stale and it will be closed automatically if no further activity occurs in the next 30 days. If you want this issue to never become stale, please ask a PSC member to apply the "no stale" label.