Fix an element "DIV" in the bottom of the page before the footer QWEB Invoice Report ODOO - pdf

I Want to fix a div element in the bottom of the page, just before the footer in the last page, it's a qweb report inherited from the standard invoice report of Odoo, the footer it's already visible only in the last page .
Any Idea ? suggestions ?
Here is a schema of what is wanted
Thanks,

As you mention your report inherits from the standard invoice report, I assume you already know that the standard invoice layout is a Qweb view named report_invoice_document and you have already defined a template like
<template id="your_module.report_invoice_document" priority="50" t-name="Your Module - Modifications to the Standard Invoice Layout" inherit_id="account.report_invoice_document">
<xpath expr="//div[hasclass('page')]" position="inside">
<div>Your content</div>
</xpath>
</template>
So the only issue is to fine tune both the XPath expression and the position. The whole report is inside a <div class="page"> tag, so using the above xpath tag will put your content just before the report's end.

Related

custom layout in form views in Odoo 14

I need a form view and I need its layout to be customized, using directly the Bootstrap 4 styles
How exactly can I do that ?
Also
I need some fields/tabs to appear conditionally (if some values is true) and such conditionally appearing fields need to be in my custom layout
Is this possible ?
How ?
First of all, I could use an example of a custom layout
And then I could use some enlightenment on how the conditional appearing of fields is done, behind the scenes
Thanks in advance
You can create a form view using any html you like. You can also use xpath to load custom css and javascript, such as bootstrap. You should load the xpath straight after your opening form tag.
<xpath expr="." position="inside">
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css" integrity="sha384-Vkoo8x4CGsO3+Hhxv8T/Q5PaXtkKtu6ug5TOeNV6gBiFeWPGFN9MuhOf23Q9Ifjh" crossorigin="anonymous">
</xpath>
There a couple of ways to show things conditionally. I find the following example easiest when using the form views:
<div id="my-div" attrs="{'invisible': [('field','==',True)]}">Do not show this text if the field is true</div>

Prestashop 1.7.1 - Top banner which hook shall be used?

Following this question I have created a new banner.
Now I want to insert a hook, but I am wondering which hook shall be used to display it on top of every page (as a promotional banner).
Thanks
Assuming you're using the classic theme, you can use the displayBanner hook. If you look at header.tpl you can find the following block:
{block name='header_banner'}
<div class="header-banner">
{hook h='displayBanner'}
</div>
{/block}
which should be displayed on top of every page

Odoo 8 - How change content in div class="page"

i have Odoo 8 and i trying to edit content of template of invoice/order and more. I managed for now to change the header and footer entering in external_layout and external_layout_header/footer (From backend of Odoo). But i don't know how change content of div class="page".
Which files should i change?
Thanks for any help
I think what you are hoping to do is inherit from a particular report. Once you have inherited from the report you can use xpath to select the node in that report template.
<template id="template_name" inherit_id="other_addon.template_name">
<xpath expr="//div[#class='page']" position="replace">
<!-- YOUR CONTENT HERE -->
</xpath>
</template>

how to link backend custom fields of product to product specification tab in bigcommerce

Under the "Product Specification" tab, i want to link this to the "Custom Fields" on the back-end(by "Back-end" I mean the control panel where you login and can modify the product) of the website. If you go to each product on the back-end, each product has a "Custom Field" tab that has the product specifications set up. I want the "Custom Field" contents in the back-end for each product to show under the "Product Specification" tab of the product's page.
Not sure if you're developing on Stencil or Blueprint, so I will explain both.
Stencil
In Stencil, first navigate to the templates/components/products/product-view.html file. Locate the custom fields code, and move it to the Product Details tab. Using handlebars, we will add the class name to the custom-field <li> and render the fields. If you only have one field, you may want to use a <p> tag instead of <li>.
{{#if product.custom_fields}}
<ul>
{{#each product.custom_fields}}
<li class="custom-field {{name}}"><span>{{name}}:</span> {{{value}}}</li>
{{/each}}
</ul>
{{/if}}
Blueprint
The Custom Fields Snippet, is located inside the ProductOtherDetails.html Panel. Inside this Panel, it calls the %%SNIPPET_ProductCustomFields%% which loops each custom field. Code below.
<div class="DetailRow %%GLOBAL_CustomFieldName%%">
<div class="Label">%%GLOBAL_CustomFieldName%%:</div>
<div class="Value">
%%GLOBAL_CustomFieldValue%%
</div>
</div>
I recommend adding the %%GLOBAL_CustomFieldName%% as a class on the DetailRow as a way to target each custom field using JS/CSS if you have more than one.
If you have more than one custom field and you only want to move the one field to the product description, I recommend using Javascript. Something like:
$('.DetailRow.CUSTOMFIELDNAME').detach().appendTo('.ProductDescription');
If you only have one custom field or you'd like all your custom fields in the product description, you can just move the Panel to the ProductDesription Panel which will render those custom fields in the product description.
Hope this helps.

Expanding the use of PlaceHolderMain in Sharepoint 2010?

I want to create a 2 column layout in my master template page. I want both the left and right HTML column < div >'s in my design to have wysiwyg editors. This is what I am picturing...
<div id="container">
<div class="left-side">
<div id="sub-menu">asp:menu</div>
<asp:ContentPlaceHolder id="PlaceHolderMain1" runat="server" />
</div>
<div class="right-side">
<asp:ContentPlaceHolder id="PlaceHolderMain2" runat="server" />
</div>
</div>
but obviously, PlaceHolderMain1 or PlaceHolderMain2 are not optional content placeholders to select by default...
http://office.microsoft.com/en-us/sharepoint-designer-help/working-with-content-placeholder-controls-HA102265026.aspx
Is there a way to create an additional HTML-PlaceHolder with SharePoint?
By creating content types for a content page layout
[configure SharePoint's site settings -> then view content types under 'Site Objects' in SharePoint Designer], you could then take advantage of your "toolbox" located in SharePoint Designer.
Create your types and your page layout under site settings from your browser
Also assign your page layout to a specific master template
Open up your new page layout in SharePoint Designer
Then use the toolbox to drag any of the available content fields into your content page layout.
Save your layout page, check it in as major. Done.
As a result, I was able to drag on a Rich HTML field PLUS a web zone, into each floating div in my content page layout. FYI, you may or may not need to add on additional Tagprefix's to your content page layout, for example, if you are calling the asp:menu into it, be ready for that...
The solution also keeps you from re-creating multiple master templates, just because you need a new HTML layout scheme to choose from.