Have application written in PHP Laravel framework. Can I create a new database in the current Odoo instance using XML-RPC call?
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- CRM
- e-Commerce
- Kế toán
- Tồn kho
- PoS
- Project
- MRP
Câu hỏi này đã bị gắn cờ
2
Trả lời
5983
Lượt xem
You just need to create a page that sends request on "/web/database/create" with the required parameters / values.
Check Odoo Database Creation page this would help you a bit.
Sudhir Arya ERP Harbor Consulting Services Skype: sudhir@erpharbor.com Website: http://www.erpharbor.com
help yourself with addons/web/controllers/main.py
class Database(http.Controller):
@http.route('/web/database/create', type='http', auth="none", methods=['POST'], csrf=False)
def create(self, master_pwd, name, lang, password, **post):
try:
if not re.match(DBNAME_PATTERN, name):
raise Exception(_('Invalid database name. Only alphanumerical characters, underscore, hyphen and dot are allowed.'))
# country code could be = "False" which is actually True in python
country_code = post.get('country_code') or False
dispatch_rpc('db', 'create_database', [master_pwd, name, bool(post.get('demo')), lang, password, post['login'], country_code])
request.session.authenticate(name, post['login'], password)
return http.local_redirect('/web/')
except Exception, e:
error = "Database creation error: %s" % (str(e) or repr(e))
return self._render_template(error=error)
Bạn có hứng thú với cuộc thảo luận không? Đừng chỉ đọc, hãy tham gia nhé!
Tạo tài khoản ngay hôm nay để tận hưởng các tính năng độc đáo và tham gia cộng đồng tuyệt vời của chúng tôi!
Đăng kýBài viết liên quan | Trả lời | Lượt xem | Hoạt động | |
---|---|---|---|---|
|
1
thg 5 20
|
2406 | ||
|
0
thg 3 18
|
4234 | ||
|
1
thg 3 15
|
7567 | ||
|
2
thg 3 15
|
10426 | ||
|
1
thg 1 23
|
5053 |