Author: |
Therp BV |
License: |
no license |
Branch: |
8.0_sale_multishop |
Repository: |
alanljj/Therp-Addons |
Dependencies: |
account,
base,
sale,
and
sale_stock |
Languages: |
Python (290, 58.0%),
XML (142, 28.4%),
and
reStructuredText (68, 13.6%) |
Other branches: |
8.0,
8.0-new_res_fiscal_position,
and
9.0 |
Other repositories: |
Bloesum/Therp-Addons,
EssentNovaTeam/Therp-Addons,
ICTSTUDIO/Therp-Addons,
InstaERP/Therp-Addons,
Mefistous/Therp-Addons,
Ray11101976/Therp-Addons,
StefanRijnhart/Therp-Addons,
Therp/Therp-Addons,
Upsyd/Therp-Addons,
asavalia/Therp-Addons,
aurestic/Therp-Addons,
daramousk/Therp-Addons,
diagramsoftware/Therp-Addons,
eboelsums/Therp-Addons,
garzadekoster/Therp-Addons,
gfcapalbo/Therp-Addons,
hbrunn/Therp-Addons,
iacsvrn/Therp-Addons,
intechbgd/Therp-Addons,
janverb/Therp-Addons,
kossovo/Therp-Addons,
lfreeke/Therp-Addons,
mgielissen/Therp-Addons,
mohamedhagag/Therp-Addons,
ntsirintanis/Therp-Addons,
odoobgorg/Therp-Addons,
odoousers2014/Therp-Addons,
opengest/Therp-Addons,
sunflowerit/Therp-Addons,
and
yasmanycastillo/Therp-Addons |
<h1 class="title">Branding company</h1>
<p>Provide branding on sales orders, stock pickings and sales invoices.</p>
<p>Branding companies provide the same information as companies. However, they
are not linked to accounting in any way. Branding companies are there to
provide a different "face" to different groups of customers or other partners.</p>
<p>The following attributes are already supported:
- logo
- name
- email
- website
- rml_footer</p>
<p>The following attributes might make sense to support as well:
- rml_header
- address (link to res_partner)
And maybe others.</p>
<p>Further, it would be nice if the replacement of the normal company logo (and
other information) on reports could be completely automatic for objects linked
to a shop. As it is, we need to customize the reports.</p>
<p>Both users and partners might be linked to a certain branding. If a user is
linked to a branding, sales orders and invoices created by that user will
default to that branding. If a partner (customer) is linked to a branding, it
will also be the default for invoices and sales order for that customer. The
customer default overrides (is more important) then the user default.</p>
<p>Actually for invoices the default branding will be taken from the sales order,
if a sales order is present. This can be no branding. Only when a customer
invoice is NOT linked to a sales order, the default branding applies.</p>
<p>You can use the branding logo in the header of your reports that use the
standard header by adding the following definition to the rml header of the
main company:</p>
<p>[[ (company.logo if not 'branding_company_id' in objects[0] else objects[0].branding_company_id.logo) or removeParentNode('image') ]]</p>
<p>In the future we will use the separate rml information of the branding
companies themselves.</p>
<p>Or you can use this in your custom reports:
<image x="5.25cm" y="3.75cm" width="150.0" height="100.0"</p>
<blockquote>
>[[ o.branding_company_id and o.branding_company_id.logo or company.logo]]</image></blockquote>
<p>You could try to change all your qweb based reports by changing the
external_layout view (Settings==>User Interface==>Views):
(NOT TESTED YET)</p>
<p><?xml version="1.0"?>
<t t-name="report.external_layout"></p>
<blockquote>
<p><!-- Multicompany -->
<t t-if="o and 'company_id' in o"></p>
<blockquote>
<t t-set="company" t-value="o.company_id"/></blockquote>
<p></t>
<t t-if="not o or not 'company_id' in o"></p>
<blockquote>
<t t-set="company" t-value="res_company"/></blockquote>
<dl class="docutils">
<dt></t></dt>
<dd><dl class="first docutils">
<dt><t t-if="o and 'branding_company_id' in o"></dt>
<dd><t t-set="company" t-value="o.branding_company_id"/></dd>
</dl>
<p class="last"></t></p>
</dd>
</dl>
<p><t t-call="report.external_layout_header"/>
<t t-raw="0"/>
<t t-call="report.external_layout_footer"/></p>
</blockquote>
<p></t></p>