Compare commits
1 commit
18.0
...
17.0-fsm_d
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
952e0990f5 |
3 changed files with 17 additions and 2 deletions
|
|
@ -20,7 +20,7 @@
|
||||||
########################################################################################
|
########################################################################################
|
||||||
{
|
{
|
||||||
"name": "Improved Field Service Management",
|
"name": "Improved Field Service Management",
|
||||||
"version": "17.0.0.3.0",
|
"version": "17.0.0.3.1",
|
||||||
"summary": (
|
"summary": (
|
||||||
"Adds functionality necessary for managing field service operations at Durpro."
|
"Adds functionality necessary for managing field service operations at Durpro."
|
||||||
),
|
),
|
||||||
|
|
|
||||||
|
|
@ -101,7 +101,7 @@ class TaskTemplate(models.Model):
|
||||||
"equipment_ids": (
|
"equipment_ids": (
|
||||||
[Command.set(self.equipment_ids.ids)] if self.equipment_ids else False
|
[Command.set(self.equipment_ids.ids)] if self.equipment_ids else False
|
||||||
),
|
),
|
||||||
"partner_id": partner_id.id,
|
"partner_id": partner_id and partner_id.id,
|
||||||
"company_id": self.company_id.id,
|
"company_id": self.company_id.id,
|
||||||
}
|
}
|
||||||
return vals
|
return vals
|
||||||
|
|
|
||||||
|
|
@ -150,3 +150,18 @@ class TaskTest(BemadeFSMBaseTest):
|
||||||
subtask.name = "Subtask 1"
|
subtask.name = "Subtask 1"
|
||||||
subtask = task.child_ids[-1]
|
subtask = task.child_ids[-1]
|
||||||
self.assertEqual(subtask.site_contacts, task.site_contacts)
|
self.assertEqual(subtask.site_contacts, task.site_contacts)
|
||||||
|
|
||||||
|
def test_subtask_inherits_parent_customer(self):
|
||||||
|
so = self._generate_sale_order()
|
||||||
|
product = self._generate_product()
|
||||||
|
partner = so.partner_id
|
||||||
|
sol = self._generate_sale_order_line(so, product)
|
||||||
|
so.action_confirm()
|
||||||
|
task = sol.task_id
|
||||||
|
|
||||||
|
self.assertEqual(task.partner_id, partner)
|
||||||
|
with Form(task) as form:
|
||||||
|
with form.child_ids.new() as child_form:
|
||||||
|
child_form.name = "something"
|
||||||
|
|
||||||
|
self.assertEqual(task.child_ids.partner_id, task.partner_id)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue