In 3d2ca8104e some change were introduced to the graph view.
But part of it had no sense when displaying data over 2 group by.
eg. if the first level has 2 groups (2018, 2019) and each second level 2
groups (Done,Cancelled), we could have:
2018/Done: 0
2018/Cancelled: 5
2019/Done: 8
2019/Cancelled: 9
this gives us two main groups [2018: 5] / [2019: 17], the code
remove the 2018 because [2018/Done] is 0 so we have something odd
with columns not in order, and in stacked bar chart some part of
a bar at the wrong offset
opw-1932517
closes #30529
20 lines
592 B
Python
20 lines
592 B
Python
# -*- coding: utf-8 -*-
|
|
# Part of Odoo. See LICENSE file for full copyright and licensing details.
|
|
|
|
import io
|
|
|
|
from PIL import Image
|
|
|
|
from odoo.tests.common import HttpCase
|
|
|
|
|
|
class TestImage(HttpCase):
|
|
def test_01_content_image_resize_placeholder(self):
|
|
response = self.url_open('/web/image/0/200x150')
|
|
image = Image.open(io.BytesIO(response.content))
|
|
self.assertEqual(image.size, (200, 150))
|
|
|
|
response = self.url_open('/web/image/fake/0/image_small')
|
|
image = Image.open(io.BytesIO(response.content))
|
|
self.assertEqual(image.size, (64, 64))
|