How to center td tags in odoo QWeb - odoo

How i can center a value in table , the table contain a column that contain the same value in each raw, i need to print only one value in all the raw and not print the value for each raw.
I try to customize print rapport in odoo sale module.

Vertical alignment is a pain in the butt in html, it is not very odoo related, take a look at this answer. If you could do what you want in HTML, then style the odoo form respectfully. But beware, changing default rendering of forms is not a good idea at all!

Related

How to Identify Elements in Salesforce Lightning for Selenium

I am trying to automate Salesforce lightning using Selenium, but getting issues with identifying elements. Reason, its having dynamic IDs , and other attributes are either very long , or they are not unique.
For eg ,
<a id="170:1968;a" class="textUnderline outputLookupLink slds-truncate forceOutputLookup"
data-refid="recordId"
data-recordid="0059E000001aOCSQA2"
data-special-link="true"
href="#/sObject/0059E000001aOCSQA2/view"
target="_blank" rel="noreferrer"
title="" data-aura-rendered-by="170:1968;a" data-aura-class="forceOutputLookup"/>
In above code , ID is dynamic , Class is not unique, and all the Lookup elements are associated with it. Also the absolute path is not much trusted , and hence I am trying to find any concrete option to handle these elements. Any help will be highly appreciated.
Here, you could try using the contains method if at least a part of the id attribute value is static.
From your code, you could try
//a[contains(#id,"a")]/ //--extended xpath--
From the given html code, the 'a' in the id attribute of the a tag looks static, while the rest changes.
You can ask the developers to provide an id to the lightning component using aura:id
Then the dynamic id won't be generated.
You can try with field labels and fetch its parent node(s), and then fetching childs or brother nodes to locate related texts/text boxes etc.
Eg. You are in Account Edit/New page, and you want to fill in a value to the text box for Account Name field. So you can firstly try with //*[text()='Account Name']/parent::* to find an element that covers BOTH the field label and the text box.
And then you can check if the text box is a 'brother' or a 'child'. If it's a 'child' then try with //*[text()='Account Name']/parent::*(/parent::*)//*[attributes for the text box];
If it's 'brothers' then try with //*[text()='Account Name']/parent::*(/parent::*)/following-sibling::*[attributes for the text box]
You can use this logic to locate all type of fields in all standard lightning pages.

Drupal 7 - Print PDF and Panelizer

Hi guys ,
I'm currently working on a Drupal project which use the Panelizer module by overriding the default node display. The panel for this content type is made width a lot of rules and specifications in order to display some specific content (like views) according some fields.
Now I need to print in PDF the same content that is displayed by the panelizer module but in another display (in one column ), so I cloned the display I use and rearranged it to display what I want.Then I want to use this display width the print module but I didn't managed to do that.
Any idea how can I do that ?
I just can't use the default node render, because I would miss some informations dues to the specifications used in the panel, and I can't print the panelized content because it's not the same display.
I read this thread but how can I say to the print module to use the "print" display I cloned instead of the default one ?
Any suggestions or ideas will be appreciated or if you have another idea for doing that you're welcome :)
Thank you !
In your print pdf template you can load the node then create a view with the display and finally render it : drupal_render(node_view(node_load($node->nid), "name of your display")) ;
Another way is to alter node entity info, telling that 'print' view can be panelized, i.e.
/**
* Implements hook_entity_info_alter().
*/
function mymodule_entity_info_alter(&$entity_info) {
$entity_info['node']['view modes']['print']['custom settings'] = TRUE;
...
}
After that, you go to panelizer settings of your content type(s), and set whatever you want for the print view mode

XSL / XSL-FO: Different formatting of a block depending on its page position on PDF page

I'm new in this mailing list, so please apologize any of my wrongdoings.
FOP 1.1
Question: Is there any condition to find the position of a text-block in on PDF page.
This is the problem:
I need to change the formatting of a title-block depending on its position on the page.
If the title-block appears somewhere in the (vertical) middle of the page, I want to add a line on top of it.
if the title-block appears at the beginning/top of a page the line must not appear
Does XSL-FO have a way to do that?
From http://lists.w3.org/Archives/Public/www-xsl-fo/2015Sep/0002.html:
I used a white background on the
fo:region-before and a negative margin on the title to 'push' the
'border-before' of the title under the fo:region-before.
This requires that the FO processor supports negative values of
'margin-top', which is allowed but not required (http://www.w3.org/TR/xsl11/#margin-top). It also requires
that the FO processor will 'paint' the fo:region-before after painting
the fo:region-body.

Reporting Services - aligning Layout direction Tablix dynamic

Deal All,
Is there a way to have same report show in both layout direction based on parameter?
I have two data set one for label and one for data based on specific parameter show the labels
needed and the data needed but i am unable to switch the lay out direction it keeps LTR.
I need if anyone have an idea to change the layout direction from parameter.
I am having 50 reports and i don't like to have 150 reports because i am having 3 language.
I don't need to change the design of reports if there a new adding columns or changing columns.
I did it in data base by sending paramater name of the report and then get the dataset for it and then use the parameter of language to get label and data.
thanks in advance
I dont know if this helps, because I have no experience with RTL, however if you select a TextBox and open the properties via F4, you can select for the text direction not only LTR or RTL but also an expression. Maybe this gives you the flexibility, you are looking for?
Please right click on the report and choose view code or press F7 and insert below code for the field:
<Style>
<FontFamily />
<TextAlign>Right</TextAlign>
</Style>
and
<Direction>RTL</Direction>

Remove the lines from a document

Goal:
Display the result without using any line between column and row
Problem:
I can't remove these line
The picture below is taken in preview mode
// Fullmetalboy
In the textbox properties for each cell of the grid, just make sure you set the BorderWidth property to 0.
Due to very limited info in the question maybe try Results-to-text instead of Results-to-grid?
I think that we need more info here... are you showing these results in a HTML page, through some dynamic language (ASP, PHP, Ruby)? or are you using reporting tools like Crystal Dynamics?
If you're doing in HTML, I guess the css rule border-collapse:collapse on the table would do the trick