🎉 Initialize module repository
This commit is contained in:
30
models/mvd_tcg_game.py
Normal file
30
models/mvd_tcg_game.py
Normal file
@@ -0,0 +1,30 @@
|
||||
"""MTG-specific deck defaults."""
|
||||
|
||||
from odoo import _, models
|
||||
|
||||
|
||||
class MvdTcgGame(models.Model):
|
||||
"""Add MTG-specific default deck boards."""
|
||||
|
||||
_inherit = "mvd.tcg.game"
|
||||
|
||||
def _mvd_tcg_get_default_deck_board_templates(self):
|
||||
"""Extend default deck boards for MTG decks.
|
||||
|
||||
Returns:
|
||||
list[dict[str, object]]: Ordered board configuration dictionaries.
|
||||
"""
|
||||
boards = super()._mvd_tcg_get_default_deck_board_templates()
|
||||
self.ensure_one()
|
||||
if self.code != "mtg":
|
||||
return boards
|
||||
|
||||
return [
|
||||
{
|
||||
"name": _("Command Zone"),
|
||||
"code": "command_zone",
|
||||
"sequence": 5,
|
||||
"include_in_total": True,
|
||||
},
|
||||
*boards,
|
||||
]
|
||||
Reference in New Issue
Block a user