Get company company's currency_id in qweb report Odoo 10 - odoo

I need to use company currency id in qweb report. i tried below codes, but nothing worked. Getting an error:
AttributeError: 'NoneType' object has no attribute 'id'
<span t-esc="company.id"/>
<span t-esc="o.company.id"/>

If o is the name of your record, which the report is printed for, and if the guideline from odoo was followed (which means the company is saved under the field company_id), then it should be:
<!-- example for currency name -->
<span t-field="o.company_id.currency_id.name" />
<!-- example for currency symbol -->
<span t-field="o.company_id.currency_id.symbol" />

Related

Odoo - Remove internal reference from Sales Order report

I am using Odoo 10 and I dont want the Product Internal Reference(default_code) printing on the Sales order report. I only want to remove from the report so customer cannot see the Internal Reference.
I tried below I seen on another post but it didnt work.
<!-- remove internal reference form Sales report.-->
<template id="sale_order_fields_inherit_saleorder_document" inherit_id="sale.report_saleorder_document">
<strong><span t-field="l.product_id.name"/></strong>
</template>
Inherit the sale_order_document report and replace the l.name with product_id.name here is complete code:
<template id="sale_order_fields_inherit_saleorder_document"
inherit_id="sale.report_saleorder_document">
<xpath expr="//span[#t-field='l.name']" position="replace">
<span t-field="l.product_id.name"/>
</xpath>
</template>
you can try this one !!, may be it'll help you.!

Odoo 10 - Print address labels for partners and contacts

I would like to know if there is something "out of the box" in Odoo 10 community to print labels (shipping labels).
I see a "Label" field in res.partner view, but not sure if it is related or not.
Thanks,
There is no relation of Label tag with partner address and contact labels. Label tag is used to give string for particular field.
<label for="type" string="Type"/>
<div name="div_type">
<field name="type" class="oe_inline"/>
</div>

How can I access extra customer registration form field values via the Bigcommerce API?

In the bigcommerce control panel, you are given the option to
add extra fields to the customer registration form.
This is shown in the control panel when Editing a customer record. They
show up, in the rendered html as this kind of thing:
<div class="field formRow ">
<label for="FormField_24"><span class="FormFieldLabel">FIELD NAME</span>
...
</label>
<div class="field-group value">
<input type="hidden" value="24" class="FormFieldId">
<input type="hidden" value="1" class="FormFieldFormId">
...
<input type="text" value="FIELD VALUE" class="field-xlarge FormField"
name="FormField[1][24]" id="FormField_24" ...>
</div>
</div>
However, walking the records with the Customer API doesn't show any of these extra fields.
Is there is anything in the Bigcommerce API that will let me access these custom customer form fields?
Update:
There are some older questions about this, that I didn't spot in searching (here, and here).
Given that those questions are from January & July last year, and still have no solution, it looks like this is simply a gap in the API. Damn.

Can £ sign be recognised in price span in Microformats?

The code inside a hProduct
<span class="price">£10.00</span>
generates an error in the Google Structured Data Testing Tool of:
Error: Price field includes invalid characters.
Changing the code to
<span class="price">$10.00</span>
Gives no errors. If I want to keep the £ inside the is there anyway to change the class etc so it will format properly?

Retrieve 5th item's price value using selenium webdriver

Say I have multiple price quotes from multiple retailers, how will I retrieve the 5th value from a particular retailer - say Target or Walmart ? I can get to the 5th entry using the matching image logo bit how do I retrieve the value ?
Adding Html Code to make things more clear .I need to retrieve the ratePrice value (198)
<div id="rate-297" class="rateResult standardResult" vendor="15">
<div class="rateDetails">
<h4>Standard Goods
<br>
<img src="http://walmart.com/walmart/ZEUSSTAR999.jpg">
</h4>
<p>
<span class="vendorPart-380">
<img alt="Walmart" src="/cb2048547924/icons/15.gif">
<br>
<strong>
<br>
MNC
</span>
</p>
</div>
<div class="ratePrice">
<h3>
$198
<sup>49</sup>
</h3>
<p>
<strong>$754.49</strong>
<br>
</p>
<a class="button-select" href="https://www.walmart.com/us/order/95134/2013-05-14-10-00/95134/2013-05-17-10-00/297"> </a>
</div>
</div>
If you could provide some HTML it would help. Speaking generally from what you're asking you'd get a locator to the price div or whatever HTML element and then get its text using something like:
_driver.FindElement(locator_of_element).Text
The trick is understanding the HTML in order to target the 5th element. So if you can find the row that has the 5th entry then it's simply a matter or then finding the price div in that row and getting the text of it.
EDIT based on more info provided by OP in comments
Using the HTML you provided (which isn't well formed by the way, missing closing strong tag, a tag, etc.). I'd say do the following:
_driver.FindElement(By.XPath("//div[#class='ratePrice'][5]/h3")).Text