Skip to content

Commit

Permalink
[FIX] fieldservice_account_analytic: automatically fill Contact in FS…
Browse files Browse the repository at this point in the history
…M Order

When customer_id is not set in the order we have:

> "customer_id" not in vals and order.customer_id is False
> False

> "customer_id" not in vals and not order.customer_id
> True
  • Loading branch information
tafaRU committed Oct 3, 2024
1 parent 1762aae commit 27b562b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion fieldservice_account_analytic/models/fsm_order.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,6 @@ def _onchange_customer_id_location(self):
def write(self, vals):
res = super(FSMOrder, self).write(vals)
for order in self:
if "customer_id" not in vals and order.customer_id is False:
if "customer_id" not in vals and not order.customer_id:
order.customer_id = order.location_id.customer_id.id
return res
1 change: 1 addition & 0 deletions fieldservice_account_analytic/readme/CONTRIBUTORS.rst
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
* Michael Allen <mallen@opensourceintegrators.com>
* Serpent Consulting Services Pvt. Ltd. <support@serpentcs.com>
* Brian McMaster <brian@mcmpest.com>
* Alex Comba <alex.comba@agilebg.com>

0 comments on commit 27b562b

Please sign in to comment.