summaryrefslogtreecommitdiff
path: root/addons
diff options
context:
space:
mode:
authorNicolas Martinelli <nim@odoo.com>2019-08-28 09:54:52 +0000
committerNicolas Martinelli <nim@odoo.com>2019-08-28 10:01:06 +0000
commit6d8e5efa84ddabd349068bbbaa7c25de14ce1dbc (patch)
tree0b7e5973b3a808bb8ed9af3d0a19c616675aa539 /addons
parent3df5c5dd562ca5f0ffa925677653e62dabb05c0c (diff)
[FIX] purchase: default user_id on bill
On top of leading to AccessError in multi-company (if the PO was created by OdooBot), it might also assign a user without Accounting rights to a vendor bill. This reverts commit 392f6f2b2bbb49a8a55b94510d51fa789b20a127. opw-2056061 closes odoo/odoo#36173 Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
Diffstat (limited to 'addons')
-rw-r--r--addons/purchase/models/purchase.py2
1 files changed, 0 insertions, 2 deletions
diff --git a/addons/purchase/models/purchase.py b/addons/purchase/models/purchase.py
index 021d4d4ca7f..d083ad98af7 100644
--- a/addons/purchase/models/purchase.py
+++ b/addons/purchase/models/purchase.py
@@ -404,8 +404,6 @@ class PurchaseOrder(models.Model):
'default_company_id': self.company_id.id,
'company_id': self.company_id.id
}
- if self.user_id:
- result['context']['default_user_id'] = self.user_id.id
# choose the view_mode accordingly
if len(self.invoice_ids) > 1 and not create_bill:
result['domain'] = "[('id', 'in', " + str(self.invoice_ids.ids) + ")]"