[IMP] orm/all: Make _name or _inherit mandatory

This is a request following the revert of the use of class names
(concerning the python inheritance and typing project)

closes odoo/design-themes#1040

X-original-commit: 2263661435
Related: odoo/odoo#191963
Related: odoo/enterprise#76269
Signed-off-by: Raphael Collet <rco@odoo.com>
This commit is contained in:
Gorash
2024-12-11 13:33:03 +00:00
committed by Raphael Collet
parent 653298dd0e
commit 89ef56bda9
31 changed files with 31 additions and 31 deletions
+1 -1
View File
@@ -5,7 +5,7 @@ from odoo.http import request
class IrHttp(models.AbstractModel): class IrHttp(models.AbstractModel):
_inherit = ['ir.http'] _inherit = 'ir.http'
@classmethod @classmethod
def _pre_dispatch(cls, rule, args): def _pre_dispatch(cls, rule, args):
+1 -1
View File
@@ -4,7 +4,7 @@ from odoo import api, models
class Website(models.Model): class Website(models.Model):
_inherit = ['website'] _inherit = 'website'
@api.model @api.model
def get_test_themes_websites_theme_preview(self): def get_test_themes_websites_theme_preview(self):
+1 -1
View File
@@ -2,7 +2,7 @@ from odoo import models
class ThemeUtils(models.AbstractModel): class ThemeUtils(models.AbstractModel):
_inherit = ['theme.utils'] _inherit = 'theme.utils'
def _theme_anelusia_post_copy(self, mod): def _theme_anelusia_post_copy(self, mod):
self.enable_view('website.template_footer_headline') self.enable_view('website.template_footer_headline')
+1 -1
View File
@@ -2,7 +2,7 @@ from odoo import models
class ThemeUtils(models.AbstractModel): class ThemeUtils(models.AbstractModel):
_inherit = ['theme.utils'] _inherit = 'theme.utils'
def _theme_artists_post_copy(self, mod): def _theme_artists_post_copy(self, mod):
self.enable_view('website.template_header_vertical') self.enable_view('website.template_header_vertical')
+1 -1
View File
@@ -2,7 +2,7 @@ from odoo import models
class ThemeUtils(models.AbstractModel): class ThemeUtils(models.AbstractModel):
_inherit = ['theme.utils'] _inherit = 'theme.utils'
def _theme_avantgarde_post_copy(self, mod): def _theme_avantgarde_post_copy(self, mod):
self.enable_view('website.template_header_hamburger') self.enable_view('website.template_header_hamburger')
+1 -1
View File
@@ -2,7 +2,7 @@ from odoo import models
class ThemeUtils(models.AbstractModel): class ThemeUtils(models.AbstractModel):
_inherit = ['theme.utils'] _inherit = 'theme.utils'
def _theme_aviato_post_copy(self, mod): def _theme_aviato_post_copy(self, mod):
self.enable_view('website.template_footer_contact') self.enable_view('website.template_footer_contact')
+1 -1
View File
@@ -2,7 +2,7 @@ from odoo import models
class ThemeUtils(models.AbstractModel): class ThemeUtils(models.AbstractModel):
_inherit = ['theme.utils'] _inherit = 'theme.utils'
def _theme_beauty_post_copy(self, mod): def _theme_beauty_post_copy(self, mod):
self.enable_view('website.footer_custom') self.enable_view('website.footer_custom')
+1 -1
View File
@@ -2,7 +2,7 @@ from odoo import models
class ThemeUtils(models.AbstractModel): class ThemeUtils(models.AbstractModel):
_inherit = ['theme.utils'] _inherit = 'theme.utils'
def _theme_bewise_post_copy(self, mod): def _theme_bewise_post_copy(self, mod):
self.enable_view('website.template_footer_headline') self.enable_view('website.template_footer_headline')
+1 -1
View File
@@ -2,7 +2,7 @@ from odoo import models
class ThemeUtils(models.AbstractModel): class ThemeUtils(models.AbstractModel):
_inherit = ['theme.utils'] _inherit = 'theme.utils'
def _theme_bistro_post_copy(self, mod): def _theme_bistro_post_copy(self, mod):
self.enable_view('website.template_header_vertical') self.enable_view('website.template_header_vertical')
+1 -1
View File
@@ -2,7 +2,7 @@ from odoo import models
class ThemeUtils(models.AbstractModel): class ThemeUtils(models.AbstractModel):
_inherit = ['theme.utils'] _inherit = 'theme.utils'
def _theme_bookstore_post_copy(self, mod): def _theme_bookstore_post_copy(self, mod):
self.enable_view('website.template_header_search') self.enable_view('website.template_header_search')
+1 -1
View File
@@ -2,7 +2,7 @@ from odoo import models
class ThemeUtils(models.AbstractModel): class ThemeUtils(models.AbstractModel):
_inherit = ['theme.utils'] _inherit = 'theme.utils'
def _theme_buzzy_post_copy(self, mod): def _theme_buzzy_post_copy(self, mod):
self.enable_view('website.template_footer_headline') self.enable_view('website.template_footer_headline')
+1 -1
View File
@@ -2,7 +2,7 @@ from odoo import models
class ThemeUtils(models.AbstractModel): class ThemeUtils(models.AbstractModel):
_inherit = ['theme.utils'] _inherit = 'theme.utils'
def _theme_clean_post_copy(self, mod): def _theme_clean_post_copy(self, mod):
self.enable_view('website.template_header_default') self.enable_view('website.template_header_default')
+1 -1
View File
@@ -2,7 +2,7 @@ from odoo import models
class ThemeUtils(models.AbstractModel): class ThemeUtils(models.AbstractModel):
_inherit = ['theme.utils'] _inherit = 'theme.utils'
def _theme_cobalt_post_copy(self, mod): def _theme_cobalt_post_copy(self, mod):
self.enable_asset("website.ripple_effect_scss") self.enable_asset("website.ripple_effect_scss")
+1 -1
View File
@@ -2,7 +2,7 @@ from odoo import models
class ThemeUtils(models.AbstractModel): class ThemeUtils(models.AbstractModel):
_inherit = ['theme.utils'] _inherit = 'theme.utils'
def _theme_common_post_copy(self, mod): def _theme_common_post_copy(self, mod):
# Reset all default color when switching themes # Reset all default color when switching themes
+1 -1
View File
@@ -2,7 +2,7 @@ from odoo import models
class ThemeUtils(models.AbstractModel): class ThemeUtils(models.AbstractModel):
_inherit = ['theme.utils'] _inherit = 'theme.utils'
def _theme_enark_post_copy(self, mod): def _theme_enark_post_copy(self, mod):
self.enable_view('website.template_footer_descriptive') self.enable_view('website.template_footer_descriptive')
+1 -1
View File
@@ -2,7 +2,7 @@ from odoo import models
class ThemeUtils(models.AbstractModel): class ThemeUtils(models.AbstractModel):
_inherit = ['theme.utils'] _inherit = 'theme.utils'
def _theme_graphene_post_copy(self, mod): def _theme_graphene_post_copy(self, mod):
self.enable_view('website.template_header_stretch') self.enable_view('website.template_header_stretch')
+1 -1
View File
@@ -2,7 +2,7 @@ from odoo import models
class ThemeUtils(models.AbstractModel): class ThemeUtils(models.AbstractModel):
_inherit = ['theme.utils'] _inherit = 'theme.utils'
def _theme_kea_post_copy(self, mod): def _theme_kea_post_copy(self, mod):
self.enable_view('website.template_footer_minimalist') self.enable_view('website.template_footer_minimalist')
+1 -1
View File
@@ -2,7 +2,7 @@ from odoo import models
class ThemeUtils(models.AbstractModel): class ThemeUtils(models.AbstractModel):
_inherit = ['theme.utils'] _inherit = 'theme.utils'
def _theme_kiddo_post_copy(self, mod): def _theme_kiddo_post_copy(self, mod):
self.enable_view('website.template_header_default_align_right') self.enable_view('website.template_header_default_align_right')
+1 -1
View File
@@ -2,7 +2,7 @@ from odoo import models
class ThemeUtils(models.AbstractModel): class ThemeUtils(models.AbstractModel):
_inherit = ['theme.utils'] _inherit = 'theme.utils'
def _theme_loftspace_post_copy(self, mod): def _theme_loftspace_post_copy(self, mod):
self.enable_view('website.template_header_search') self.enable_view('website.template_header_search')
+1 -1
View File
@@ -2,7 +2,7 @@ from odoo import models
class ThemeUtils(models.AbstractModel): class ThemeUtils(models.AbstractModel):
_inherit = ['theme.utils'] _inherit = 'theme.utils'
def _theme_monglia_post_copy(self, mod): def _theme_monglia_post_copy(self, mod):
self.enable_view('website.template_footer_minimalist') self.enable_view('website.template_footer_minimalist')
+1 -1
View File
@@ -2,7 +2,7 @@ from odoo import models
class ThemeUtils(models.AbstractModel): class ThemeUtils(models.AbstractModel):
_inherit = ['theme.utils'] _inherit = 'theme.utils'
def _theme_nano_post_copy(self, mod): def _theme_nano_post_copy(self, mod):
+1 -1
View File
@@ -2,7 +2,7 @@ from odoo import models
class ThemeUtils(models.AbstractModel): class ThemeUtils(models.AbstractModel):
_inherit = ['theme.utils'] _inherit = 'theme.utils'
def _theme_notes_post_copy(self, mod): def _theme_notes_post_copy(self, mod):
self.enable_view('website.template_footer_descriptive') self.enable_view('website.template_footer_descriptive')
@@ -2,7 +2,7 @@ from odoo import models
class ThemeUtils(models.AbstractModel): class ThemeUtils(models.AbstractModel):
_inherit = ['theme.utils'] _inherit = 'theme.utils'
def _theme_odoo_experts_post_copy(self, mod): def _theme_odoo_experts_post_copy(self, mod):
self.enable_view('website.template_footer_contact') self.enable_view('website.template_footer_contact')
+1 -1
View File
@@ -2,7 +2,7 @@ from odoo import models
class ThemeUtils(models.AbstractModel): class ThemeUtils(models.AbstractModel):
_inherit = ['theme.utils'] _inherit = 'theme.utils'
def _theme_orchid_post_copy(self, mod): def _theme_orchid_post_copy(self, mod):
self.enable_view('website.template_header_default') self.enable_view('website.template_header_default')
+1 -1
View File
@@ -2,7 +2,7 @@ from odoo import models
class ThemeUtils(models.AbstractModel): class ThemeUtils(models.AbstractModel):
_inherit = ['theme.utils'] _inherit = 'theme.utils'
def _theme_paptic_post_copy(self, mod): def _theme_paptic_post_copy(self, mod):
self.enable_asset("website.ripple_effect_scss") self.enable_asset("website.ripple_effect_scss")
@@ -2,7 +2,7 @@ from odoo import models
class ThemeUtils(models.AbstractModel): class ThemeUtils(models.AbstractModel):
_inherit = ['theme.utils'] _inherit = 'theme.utils'
def _theme_real_estate_post_copy(self, mod): def _theme_real_estate_post_copy(self, mod):
self.enable_asset("website.ripple_effect_scss") self.enable_asset("website.ripple_effect_scss")
+1 -1
View File
@@ -4,7 +4,7 @@ from odoo import models
class ThemeUtils(models.AbstractModel): class ThemeUtils(models.AbstractModel):
_inherit = ['theme.utils'] _inherit = 'theme.utils'
@property @property
def _header_templates(self): def _header_templates(self):
+1 -1
View File
@@ -2,7 +2,7 @@ from odoo import models
class ThemeUtils(models.AbstractModel): class ThemeUtils(models.AbstractModel):
_inherit = ['theme.utils'] _inherit = 'theme.utils'
def _theme_treehouse_post_copy(self, mod): def _theme_treehouse_post_copy(self, mod):
self.disable_view('website.header_visibility_standard') self.disable_view('website.header_visibility_standard')
+1 -1
View File
@@ -2,7 +2,7 @@ from odoo import models
class ThemeUtils(models.AbstractModel): class ThemeUtils(models.AbstractModel):
_inherit = ['theme.utils'] _inherit = 'theme.utils'
def _theme_vehicle_post_copy(self, mod): def _theme_vehicle_post_copy(self, mod):
self.enable_view('website.template_footer_minimalist') self.enable_view('website.template_footer_minimalist')
+1 -1
View File
@@ -2,7 +2,7 @@ from odoo import models
class ThemeUtils(models.AbstractModel): class ThemeUtils(models.AbstractModel):
_inherit = ['theme.utils'] _inherit = 'theme.utils'
def _theme_yes_post_copy(self, mod): def _theme_yes_post_copy(self, mod):
self.enable_view('website.template_footer_descriptive') self.enable_view('website.template_footer_descriptive')
+1 -1
View File
@@ -2,7 +2,7 @@ from odoo import models
class ThemeUtils(models.AbstractModel): class ThemeUtils(models.AbstractModel):
_inherit = ['theme.utils'] _inherit = 'theme.utils'
def _theme_zap_post_copy(self, mod): def _theme_zap_post_copy(self, mod):
self.enable_view('website.template_header_sales_four') self.enable_view('website.template_header_sales_four')