- game_api.py: request.session.authenticate 改为 Odoo 18 签名
authenticate(db, {'type':'password','login':...,'password':...}),
修复此前多传参数导致的 500 / Access Denied
- game_api.py: 注册成功后先 commit 再自动登录(避免新用户事务未提交导致 Access Denied)
- game_api.py: 登录 authenticate 包 try/except,错误密码返回干净报错而非 500
- world.html: 新增登录闸门——未登录跳转 login.html?next=world.html,
已登录显示左上角昵称+退出;进入游戏即需登录(与 Odoo 打通)
|
||
|---|---|---|
| addons | ||
| assets | ||
| website | ||
| .gitignore | ||
| index.html | ||
| login.html | ||
| README.md | ||
| terrain_preview.html | ||
| world.html | ||
宇森 (YuSen) - Game Addons
Odoo 模块仓库,为宇森文明经营游戏提供后端支持。
结构
-
- Odoo 自定义模块
- 模块命名规范:
技术栈
- Odoo 18
- PostgreSQL
- HTML5 Canvas (前端)