Search 1.9 billion lines of Odoo code on GitHub

branding_company

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 &quot;face&quot; 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: &lt;image x=&quot;5.25cm&quot; y=&quot;3.75cm&quot; width=&quot;150.0&quot; height=&quot;100.0&quot;</p> <blockquote> &gt;[[ o.branding_company_id and o.branding_company_id.logo or company.logo]]&lt;/image&gt;</blockquote> <p>You could try to change all your qweb based reports by changing the external_layout view (Settings==&gt;User Interface==&gt;Views): (NOT TESTED YET)</p> <p>&lt;?xml version=&quot;1.0&quot;?&gt; &lt;t t-name=&quot;report.external_layout&quot;&gt;</p> <blockquote> <p>&lt;!-- Multicompany --&gt; &lt;t t-if=&quot;o and 'company_id' in o&quot;&gt;</p> <blockquote> &lt;t t-set=&quot;company&quot; t-value=&quot;o.company_id&quot;/&gt;</blockquote> <p>&lt;/t&gt; &lt;t t-if=&quot;not o or not 'company_id' in o&quot;&gt;</p> <blockquote> &lt;t t-set=&quot;company&quot; t-value=&quot;res_company&quot;/&gt;</blockquote> <dl class="docutils"> <dt>&lt;/t&gt;</dt> <dd><dl class="first docutils"> <dt>&lt;t t-if=&quot;o and 'branding_company_id' in o&quot;&gt;</dt> <dd>&lt;t t-set=&quot;company&quot; t-value=&quot;o.branding_company_id&quot;/&gt;</dd> </dl> <p class="last">&lt;/t&gt;</p> </dd> </dl> <p>&lt;t t-call=&quot;report.external_layout_header&quot;/&gt; &lt;t t-raw=&quot;0&quot;/&gt; &lt;t t-call=&quot;report.external_layout_footer&quot;/&gt;</p> </blockquote> <p>&lt;/t&gt;</p>