Skip to content

Commit 9ed9eae

Browse files
committed
[IMP] report_qweb_operating_unit: Add partner image and other info notice
1 parent 2be1fa7 commit 9ed9eae

File tree

6 files changed

+33
-4
lines changed

6 files changed

+33
-4
lines changed

report_qweb_operating_unit/README.rst

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -54,14 +54,16 @@ Authors
5454

5555
* ForgeFlow S.L.
5656
* Serpent Consulting Services Pvt. Ltd.
57+
* Onestein
5758

5859
Contributors
5960
------------
6061

61-
- ForgeFlow S.L. <contact@forgeflow.com>
62-
- Serpent Consulting Services Pvt. Ltd. <support@serpentcs.com>
63-
- Jarsa Sistemas <info@jarsa.com.mx>
64-
- Juany Davila <juany.davila@forgeflow.com>
62+
- ForgeFlow S.L. <contact@forgeflow.com>
63+
- Serpent Consulting Services Pvt. Ltd. <support@serpentcs.com>
64+
- Jarsa Sistemas <info@jarsa.com.mx>
65+
- Juany Davila <juany.davila@forgeflow.com>
66+
- Dennis Sluijk <d.sluijk@onestein.nl>
6567

6668
Maintainers
6769
-----------

report_qweb_operating_unit/__manifest__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
"license": "LGPL-3",
1010
"author": "ForgeFlow S.L., "
1111
"Serpent Consulting Services Pvt. Ltd.,"
12+
"Onestein,"
1213
"Odoo Community Association (OCA)",
1314
"website": "https://github.com/OCA/operating-unit",
1415
"depends": ["operating_unit"],

report_qweb_operating_unit/models/operating_unit.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,20 @@ class OperatingUnit(models.Model):
3434
is_operating_unit_details_empty = fields.Boolean(
3535
compute="_compute_empty_operating_unit_details"
3636
)
37+
partner_image = fields.Image(
38+
string="Logo",
39+
compute="_compute_partner_image",
40+
inverse="_inverse_partner_image",
41+
)
42+
43+
@api.depends("partner_id", "partner_id.image_1920")
44+
def _compute_partner_image(self):
45+
for operating_unit in self:
46+
operating_unit.partner_image = operating_unit.partner_id.image_1920
47+
48+
def _inverse_partner_image(self):
49+
for operating_unit in self:
50+
operating_unit.partner_id.image_1920 = operating_unit.partner_image
3751

3852
@api.depends("company_id")
3953
def _compute_report_header(self):

report_qweb_operating_unit/readme/CONTRIBUTORS.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,4 @@
22
- Serpent Consulting Services Pvt. Ltd. \<<support@serpentcs.com>\>
33
- Jarsa Sistemas \<<info@jarsa.com.mx>\>
44
- Juany Davila \<<juany.davila@forgeflow.com>\>
5+
- Dennis Sluijk \<<d.sluijk@onestein.nl>\>

report_qweb_operating_unit/static/description/index.html

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -399,6 +399,7 @@ <h2><a class="toc-backref" href="#toc-entry-3">Authors</a></h2>
399399
<ul class="simple">
400400
<li>ForgeFlow S.L.</li>
401401
<li>Serpent Consulting Services Pvt. Ltd.</li>
402+
<li>Onestein</li>
402403
</ul>
403404
</div>
404405
<div class="section" id="contributors">
@@ -408,6 +409,7 @@ <h2><a class="toc-backref" href="#toc-entry-4">Contributors</a></h2>
408409
<li>Serpent Consulting Services Pvt. Ltd. &lt;<a class="reference external" href="mailto:support&#64;serpentcs.com">support&#64;serpentcs.com</a>&gt;</li>
409410
<li>Jarsa Sistemas &lt;<a class="reference external" href="mailto:info&#64;jarsa.com.mx">info&#64;jarsa.com.mx</a>&gt;</li>
410411
<li>Juany Davila &lt;<a class="reference external" href="mailto:juany.davila&#64;forgeflow.com">juany.davila&#64;forgeflow.com</a>&gt;</li>
412+
<li>Dennis Sluijk &lt;<a class="reference external" href="mailto:d.sluijk&#64;onestein.nl">d.sluijk&#64;onestein.nl</a>&gt;</li>
411413
</ul>
412414
</div>
413415
<div class="section" id="maintainers">

report_qweb_operating_unit/views/operating_unit_view.xml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,15 @@
99
<notebook>
1010
<page string="Report Layout">
1111
<group>
12+
<field
13+
name="partner_image"
14+
widget="image"
15+
options="{'size': [100, 100]}"
16+
/>
17+
<p
18+
class="alert alert-info"
19+
colspan="2"
20+
>Address and other information that appear on the report can be changed on the partner form</p>
1221
<field name="report_header" />
1322
<field name="report_footer" />
1423
<field name="operating_unit_details" />

0 commit comments

Comments
 (0)