odoo-usability icon indicating copy to clipboard operation
odoo-usability copied to clipboard

purchase_usability: remove unnecessary field `delivery_partner_id`

Open clementmbr opened this issue 4 years ago • 1 comments

I understood this field was aimed to be used in PO reports, but there is not such report's inherited views in the modules. Moreover in native module purchase_stock there is already a condition displaying the warehouse's partner_id as Shipping Address (as expected) : https://github.com/odoo/odoo/blob/14.0/addons/purchase_stock/report/purchase_report_templates.xml#L11

So it looks like we can remove this unnecessary field delivery_partner_id.

cc @alexis-via @rvalyi

clementmbr avatar Jun 23 '21 08:06 clementmbr

Hello @clementmbr ,

  1. The fact that there is no report using the field in the module is not a big surprise: it's often the case with fields defined by the Custom Report Fields Wizard - @alexis-via - because we often need customized reports so maintaining a generic report is often not worth the effort, although this is somewhat done in https://github.com/akretion/odoo-py3o-report-templates (I would personally advocate for having equivalent reports as qweb now that qweb is solid enough).
  2. I see a situation where the delivery_partner_id defined here could be useful and different from the native shipping address from Odoo CE https://github.com/odoo/odoo/blob/14.0/addons/purchase_stock/report/purchase_report_templates.xml#L11 , the case with a drop shipping address where you would deliver to the customer directly or some other non internal delivery address. The purchase_stock module only deals with a delivery address related to a warehouse. And the stock_drop_shipping module doesn't fix it.
  3. I searched in the history to find out if it was a left over from an old module, but it is not th case: it appeared in v12 along with the purchase_stock module which was working very much like in v14 so I guess it was done for the reason I mentionned in 2.

rvalyi avatar Jun 23 '21 12:06 rvalyi

I use that field in my py3o template reports, so I prefer to keep that field

alexis-via avatar Mar 14 '24 16:03 alexis-via