Merge branch '17.0-changes' into '17.0'

Durpro inheritance mixin editing and work order print depending on language of work order contact

See merge request bemade/bemade-addons!107
This commit is contained in:
Marc Durepos 2025-06-19 13:07:15 +00:00
commit 1e57afd3ca
4 changed files with 12 additions and 9 deletions

View file

@ -39,6 +39,7 @@
"fsm_equipment",
"bemade_partner_root_ancestor",
"mail",
"durpro_tag_inheritance",
],
"data": [
"data/fsm_data.xml",

View file

@ -172,6 +172,8 @@ class SaleOrderLine(models.Model):
"product_name": self.product_id.name,
}
task.message_post(body=task_msg)
task._inherit_tags_from(self.order_id)
if not task.equipment_ids and self.equipment_ids:
task.equipment_ids = self.equipment_ids.ids
return task

View file

@ -3,6 +3,8 @@ from odoo.addons.project.models.project_task import CLOSED_STATES
import re
class Task(models.Model):
_inherit = "project.task"

View file

@ -350,7 +350,8 @@
t-esc="doc.partner_id"
t-options='{
"widget": "contact",
"fields": ["name", "address",]
"fields": ["name", "address",],
"lang": "fr_FR"
}'
/>
</t>
@ -361,11 +362,11 @@
>
<div t-if="doc.planned_date_begin"><h6>Planned start: </h6></div>
<div class="mb-3">
<div t-out="doc.planned_date_begin.strftime('%Y-%m-%d %H:%M')" />
<div t-esc="context_timestamp(doc.planned_date_begin).strftime('%Y-%m-%d %H:%M')" />
</div>
<div t-if="doc.date_deadline"><h6>Planned end: </h6></div>
<div class="mb-3">
<div t-out="doc.date_deadline.strftime('%Y-%m-%d %H:%M')" />
<div t-out="context_timestamp(doc.date_deadline).strftime('%Y-%m-%d %H:%M')" />
</div>
</div>
</div>
@ -563,12 +564,9 @@
<template id="work_order">
<t t-call="web.html_container">
<t t-foreach="docs" t-as="doc">
<t t-set="doc" t-value="doc.root_ancestor" t-if="doc.parent_id" />
<t t-set="doc" t-value="doc.root_ancestor.with_context(tz=doc.partner_id.tz)" t-if="doc.parent_id"/>
<t t-call="web.external_layout">
<t
t-call="bemade_fsm.work_order_page"
t-lang="doc.partner_id.lang"
/>
<t t-call="bemade_fsm.work_order_page"/>
</t>
</t>
</t>
@ -582,7 +580,7 @@
expr="//t[@t-call='industry_fsm_report.worksheet_custom_page']"
position="replace"
>
<div t-call="bemade_fsm.work_order_page" />
<t t-call="bemade_fsm.work_order_page" t-lang="(doc.work_order_contacts and doc.work_order_contacts[0].lang) or 'en_US'"/>
</xpath>
</template>
</odoo>