File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -167,6 +167,7 @@ def unlink(self):
167167 def write (self , values ):
168168 if not self .env .context .get ("ignore_company_color" , False ):
169169 fields_to_check = (
170+ "company_colors" ,
170171 "color_navbar_bg" ,
171172 "color_navbar_bg_hover" ,
172173 "color_navbar_text" ,
Original file line number Diff line number Diff line change @@ -95,6 +95,10 @@ def test_reset_colors(self):
9595 }
9696 )
9797 company .button_reset_colors ()
98+ company .invalidate_recordset ()
99+ self .assertEqual (
100+ company .company_colors , {}, "company_colors should be empty after reset"
101+ )
98102 self .assertFalse (company .color_navbar_bg , "color_navbar_bg should be reset" )
99103 self .assertFalse (
100104 company .color_navbar_bg_hover , "color_navbar_bg_hover should be reset"
@@ -112,8 +116,12 @@ def test_reset_colors(self):
112116 self .assertFalse (
113117 company .color_submenu_text , "color_submenu_text should be reset"
114118 )
115- self .assertFalse (
116- company .company_colors , "company_colors should be empty after reset"
119+ attachment = self .env ["ir.attachment" ].search (
120+ [("url" , "=" , company .scss_get_url ())]
121+ )
122+ css = base64 .b64decode (attachment .datas ).decode ()
123+ self .assertNotIn (
124+ "#111111" , css , "SCSS should not contain old colors after reset"
117125 )
118126
119127 def test_compiled_scss (self ):
You can’t perform that action at this time.
0 commit comments