Reviewers: ,
Please review this at http://codereview.tryton.org/611005/ Affected files: M trytond/model/model.py Index: trytond/model/model.py =================================================================== --- a/trytond/model/model.py +++ b/trytond/model/model.py @@ -54,6 +54,7 @@ 'fields_get': RPC(), 'on_change_with': RPC(instantiate=0), 'pre_validate': RPC(instantiate=0), + 'get_url': RPC(), } cls._error_messages = {} @@ -701,3 +702,10 @@ value = [r._default_values for r in value] values[fname] = value return values + + @classmethod + def get_url(cls, resource_id): + if resource_id is not None: + return cls(resource_id).__url__ + else: + return cls.__url__ -- -- [email protected] mailing list
