Open tvanesse opened 8 years ago
Up @fdegrave
Hi Thomas!
Thank you for the suggestion, and sorry for the late answer (I'm just back from holidays). I think your proposal is a good -- and quick to implement -- starting point to improve the robustness of the system.
I was also thinking of saving the Odoo model description locally and use it if the Odoo server is unreachable -- and just log a warning in that case. I'll do that as soon as I have some free time.
Cheers,
F.
Following my last comment in PR #2 , I'd like to make sure
djangodoo
does not introduce any unneeded dependency between a Django project usingdjangodoo
and the availability of an Odoo instance.I imagine the
raise
statement at line 93 in init.py could be handled with some logic that would markOdooModel
as "currently unavailable" so that any reference to anOdooModel
object defined in the user's application will chain aRuntimeException
that can be handled in any desired way by the developer.I'm thinking of adding some lines at the end of
__init__.py
likeand then in the user application
@fdegrave this is just a very basic idea and I'd like to hear your take on that. I am not convinced this is the best solution and I'm not familiar with the underlying mechanisms of Django that could potentially simplify the implementation of this feature. How would you implement it?