summaryrefslogtreecommitdiff
path: root/odoo/addons/base/data/base_data.sql
diff options
context:
space:
mode:
authorNicolas Martinelli <nim@odoo.com>2020-05-26 08:38:01 +0000
committerNicolas Martinelli <nim@odoo.com>2020-05-26 11:42:25 +0000
commit1229b9a19c7aa8e3669d96f73aedd3d7c4a3e1d3 (patch)
treea9f008c5e45856066400f6d87607558caf40a709 /odoo/addons/base/data/base_data.sql
parent9a8fdda8ab09e2a8394a2bf3bf7acbc349b112ad (diff)
[FIX] sale_purchase: do not set Drop Ship Address
- Create 2 companies A & B - Customers are not shared between companies - Intercompany transactions activated (SO/PO + automatic validation) - Create a service product P with MTO + Buy route - Company B is a supplier for the product P - Sell the product in company A to a customer C => a PO is generated in A thanks to the MTO rule - Confirm the PO => a SO is generated in company B - Set the user to have access to company B only - Open the SO An `AccessError` is raised during a `read` call on `res.partner` C. The partner C is set as a delivery address of the SO because it is set on the PO as a `dest_address_id`: https://github.com/odoo/enterprise/blob/5a841b25389106ce254828a0383b4c71987b9f3a/inter_company_rules/models/purchase_order.py#L62 Looking further, it is set on the PO in the `sale_purchase` module. Actually, there is no point of setting the field on the PO: `dest_address_id` is a Dropship address only used in Stock: https://github.com/odoo/odoo/blob/f705c4088ea7584b17769220a0a7ffcb00546e0b/addons/purchase_stock/views/purchase_views.xml#L38 Dropshipping is not supported for services. Moreover, in that specific case the picking type usage is internal, so it should be `False`: https://github.com/odoo/odoo/blob/f705c4088ea7584b17769220a0a7ffcb00546e0b/addons/purchase_stock/models/purchase.py#L55 opw-2260553 closes odoo/odoo#51888 X-original-commit: 9d6da7724a40bcc6b5c76aa733e7deee1b0ce922 Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
Diffstat (limited to 'odoo/addons/base/data/base_data.sql')
0 files changed, 0 insertions, 0 deletions