后端 game_base: - 货币并入 game.rule(rate/note 字段),新增可配置规则类别 game.rule.category(world/faction/character/currency) - 新增「配置」菜单与规则类别配置子项 - /game/api/rules 按类别分组返回,/game/api/currencies 保持兼容 - 列表分组取消等级累计(aggregator=False,适配 Odoo18) - 1.2 pre-migrate 清理旧 game.currency 记录,避免外部ID冲突 前端/官网: - 世界数据大报表(index.html + .wd-* 样式) - 背景 5 板块同步、论坛汉化、过渡资源与 views 拆分(announcement/codex/forum/page/rule/story)
19 lines
557 B
Python
19 lines
557 B
Python
# -*- coding: utf-8 -*-
|
|
from odoo import models, fields
|
|
|
|
|
|
class GameRuleCategory(models.Model):
|
|
_name = 'game.rule.category'
|
|
_description = '规则类别'
|
|
_order = 'sequence, id'
|
|
_rec_name = 'name'
|
|
|
|
_sql_constraints = [
|
|
('key_uniq', 'unique(key)', '规则类别标识必须唯一'),
|
|
]
|
|
|
|
key = fields.Char(string='标识', required=True, index=True)
|
|
name = fields.Char(string='名称', required=True)
|
|
sequence = fields.Integer(string='排序', default=10)
|
|
active = fields.Boolean(string='启用', default=True)
|