Odoo 도움말


1 응답

Anil R. Kesariya (AKE) India

--Anil R. Kesariya (AKE)--
| 8 7 10
Rajkot, India
--Anil R. Kesariya (AKE)--

Odoo Techno Functional Expert

* Engaged with odoo since May - 2012.

* Customise existing module or develop new module base on customer requirement.

* Played key developer role in many past and running projects.

* Expert in requirement gathering of business and transforming requirement into odoo platform.

* Major expertise in core modules, database, report development and theme development.

* Integration expert.

Linkedin  : https://in.linkedin.com/in/anil-kesariya-97b20a66

Upwork : https://www.upwork.com/fl/anilkesariya

Anil R. Kesariya (AKE) India
17. 9. 14. 오전 5:02

Hi All,

I've found solution

Here is the solution which i was looking for.

from odoo import models
from odoo.exceptions import AccessError
import odoo
from odoo.addons.website.models.website import slugify

def my_slug(value):
if isinstance(value, models.BaseModel):
if isinstance(value.id, models.NewId):
raise ValueError("Cannot slug non-existent record %s" % value)
# [(id, name)] = value.name_get()
# identifier, name = value.id, value.display_name
identifier = value.id
name = value.display_name
except AccessError:
print "This page is not accessible.... custom method.."
# To do return new template with message
# assume name_search result tuple
identifier, name = value

slugname = slugify(name or '').strip().strip('-')
if not slugname:
return str(identifier)
return "%s-%d" % (slugname, identifier)

def new_to_url(self, value):
return my_slug(value)

odoo.addons.website.models.ir_http.ModelConverter.to_url = new_to_url



Keep Informed
1 팔로워
About This Community

This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now