[FW][FIX] event_*, survey: fix form views
Purpose ======= Fix various form views broken because of the always edit mode. Specifications =========== website_event_questions Avoid truncated question display by making the question field to take all available horizontal space. website_slides Remove unnecessary helpers so that they don't clutter the form view. event_booth Adding placeholder for booth category on event type booth form. survey Fixing the question type previews which have been broken due to the new form grid layout. Task-3004219 Parent-Task-2996467 closes odoo/odoo#102547 Forward-port-of: odoo/odoo#101959 Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
This commit is contained in:
@@ -18,7 +18,7 @@
|
||||
</div>
|
||||
<group>
|
||||
<group name="details">
|
||||
<field name="booth_category_id"/>
|
||||
<field name="booth_category_id" placeholder="Pick a Booth Category..."/>
|
||||
</group>
|
||||
<group name="renter">
|
||||
<field name="partner_id"/>
|
||||
@@ -146,7 +146,7 @@
|
||||
<form>
|
||||
<group>
|
||||
<field name="name" placeholder="e.g. First Booth Alley 1"/>
|
||||
<field name="booth_category_id"/>
|
||||
<field name="booth_category_id" placeholder="Pick a Booth Category..."/>
|
||||
</group>
|
||||
</form>
|
||||
</field>
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
<h1><field name="name" placeholder="e.g. First Booth Alley 1"/></h1>
|
||||
</div>
|
||||
<group>
|
||||
<field name="booth_category_id"/>
|
||||
<field name="booth_category_id" placeholder="Pick a Booth Category..."/>
|
||||
</group>
|
||||
</sheet>
|
||||
</form>
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<field name="arch" type="xml">
|
||||
<form string="Question">
|
||||
<sheet>
|
||||
<h1><field name="title" placeholder='e.g. "Do you have any diet restrictions?"' /></h1>
|
||||
<h1 class="d-flex"><field name="title" placeholder='e.g. "Do you have any diet restrictions?"' class="flex-grow-1"/></h1>
|
||||
<group>
|
||||
<group>
|
||||
<field name="is_mandatory_answer"/>
|
||||
|
||||
@@ -45,7 +45,7 @@
|
||||
We need this because we create questions and answers when the event type changes. -->
|
||||
<form string="Question">
|
||||
<sheet>
|
||||
<h1><field name="title" placeholder='e.g. "Do you have any diet restrictions?"' /></h1>
|
||||
<h1 class="d-flex"><field name="title" placeholder='e.g. "Do you have any diet restrictions?"' class="flex-grow-1"/></h1>
|
||||
<group>
|
||||
<group>
|
||||
<field name="is_mandatory_answer"/>
|
||||
|
||||
@@ -123,7 +123,7 @@ class Slide(models.Model):
|
||||
tag_ids = fields.Many2many('slide.tag', 'rel_slide_tag', 'slide_id', 'tag_id', string='Tags')
|
||||
is_preview = fields.Boolean('Allow Preview', default=False, help="The course is accessible by anyone : the users don't need to join the channel to access the content of the course.")
|
||||
is_new_slide = fields.Boolean('Is New Slide', compute='_compute_is_new_slide')
|
||||
completion_time = fields.Float('Duration', digits=(10, 4), help="The estimated completion time for this slide")
|
||||
completion_time = fields.Float('Duration', digits=(10, 4))
|
||||
# Categories
|
||||
is_category = fields.Boolean('Is a category', default=False)
|
||||
category_id = fields.Many2one('slide.slide', string="Section", compute="_compute_category_id", store=True)
|
||||
@@ -173,8 +173,7 @@ class Slide(models.Model):
|
||||
# content - webpage
|
||||
html_content = fields.Html("HTML Content", help="Custom HTML content for slides of category 'Article'.", translate=True, sanitize_attributes=False, sanitize_form=False)
|
||||
# content - images
|
||||
image_binary_content = fields.Binary('Image Content', related='binary_content', readonly=False,
|
||||
help="Used to filter file input to images only")
|
||||
image_binary_content = fields.Binary('Image Content', related='binary_content', readonly=False) # Used to filter file input to images only
|
||||
image_google_url = fields.Char('Image Link', related='url', readonly=False,
|
||||
help="Link of the image (we currently only support Google Drive as source)")
|
||||
# content - documents
|
||||
@@ -193,8 +192,7 @@ class Slide(models.Model):
|
||||
help="Subtype of the slide category, allows more precision on the actual file type / source type.")
|
||||
document_google_url = fields.Char('Document Link', related='url', readonly=False,
|
||||
help="Link of the document (we currently only support Google Drive as source)")
|
||||
document_binary_content = fields.Binary('PDF Content', related='binary_content', readonly=False,
|
||||
help="Used to filter file input to PDF only")
|
||||
document_binary_content = fields.Binary('PDF Content', related='binary_content', readonly=False) # Used to filter file input to PDF only
|
||||
# content - videos
|
||||
video_url = fields.Char('Video Link', related='url', readonly=False,
|
||||
help="Link of the video (we support YouTube, Google Drive and Vimeo as sources)")
|
||||
|
||||
Reference in New Issue
Block a user