Skip to content

Commit

Permalink
[IMP] purchase: user_id field set to copy=False
Browse files Browse the repository at this point in the history
  • Loading branch information
bealdav committed Mar 18, 2019
1 parent fc1389f commit 60a0a07
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion addons/purchase/models/purchase.py
Expand Up @@ -123,7 +123,7 @@ def _compute_invoice(self):
incoterm_id = fields.Many2one('account.incoterms', 'Incoterm', states={'done': [('readonly', True)]}, help="International Commercial Terms are a series of predefined commercial terms used in international transactions.")

product_id = fields.Many2one('product.product', related='order_line.product_id', string='Product', readonly=False)
user_id = fields.Many2one('res.users', string='Purchase Representative', index=True, track_visibility='onchange', default=lambda self: self.env.user)
user_id = fields.Many2one('res.users', string='Purchase Representative', index=True, track_visibility='onchange', default=lambda self: self.env.user, copy=False)
company_id = fields.Many2one('res.company', 'Company', required=True, index=True, states=READONLY_STATES, default=lambda self: self.env.user.company_id.id)

def _compute_access_url(self):
Expand Down

0 comments on commit 60a0a07

Please sign in to comment.