Skip to content
Permalink
Browse files

[IMP] purchase: keep purchase representative empty in the purchase order

 purpose of this task is do not set default purchase representative in the purchase order when the PO is created automatically.
 When the purchase order is created automatically, this purchase order would be assigned to odoobot.
 Odoobot is not a real user. so nobody notified any activity of that purchase order.
 so keep the responsible field empty when the PO is created automatically.
 Purchase manager can easily filter "unassigned" purchase order and he can assign unassigned PO to someone (real user).

Task-1940489
  • Loading branch information...
jip-odoo committed Mar 7, 2019
1 parent b01ce6e commit 1310c4a9a80327bf8c435be7ce595ef5eabb6533
@@ -28,6 +28,7 @@

<record id="rfq1" model="purchase.order">
<field name="partner_id" ref="base.res_partner_4"/>
<field name="user_id" ref="base.user_admin"/>
<field name="requisition_id" ref="requisition1"/>
</record>

@@ -43,6 +44,7 @@

<record id="rfq2" model="purchase.order">
<field name="partner_id" ref="base.res_partner_1"/>
<field name="user_id" ref="base.user_admin"/>
<field name="requisition_id" ref="requisition1"/>
</record>

@@ -264,6 +264,7 @@ def _prepare_purchase_order(self, company_id, origins, values):

return {
'partner_id': partner.id,
'user_id': False,
'picking_type_id': self.picking_type_id.id,
'company_id': company_id.id,
'currency_id': partner.with_context(force_company=company_id.id).property_purchase_currency_id.id or self.env.user.company_id.currency_id.id,

0 comments on commit 1310c4a

Please sign in to comment.
You can’t perform that action at this time.