Durpro inheritance mixin editing and work order print depending on language of work order contact
This commit is contained in:
parent
20e4f6c8b3
commit
67fcffb37a
4 changed files with 10 additions and 8 deletions
|
|
@ -39,6 +39,7 @@
|
|||
"fsm_equipment",
|
||||
"bemade_partner_root_ancestor",
|
||||
"mail",
|
||||
"durpro_tag_inheritance",
|
||||
],
|
||||
"data": [
|
||||
"data/fsm_data.xml",
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -4,7 +4,8 @@ import re
|
|||
|
||||
|
||||
class Task(models.Model):
|
||||
_inherit = "project.task"
|
||||
_inherit = ["project.task", "durpro.tag.inheritance.mixin"]
|
||||
_name = "project.task"
|
||||
|
||||
work_order_contacts = fields.Many2many(
|
||||
comodel_name="res.partner",
|
||||
|
|
|
|||
|
|
@ -350,7 +350,8 @@
|
|||
t-esc="doc.partner_id"
|
||||
t-options='{
|
||||
"widget": "contact",
|
||||
"fields": ["name", "address",]
|
||||
"fields": ["name", "address",],
|
||||
"lang": "fr_FR"
|
||||
}'
|
||||
/>
|
||||
</t>
|
||||
|
|
@ -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" 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>
|
||||
|
|
|
|||
Loading…
Reference in a new issue