-
-
Notifications
You must be signed in to change notification settings - Fork 665
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Migration of account_invoice_line_no_picking_name #72
Conversation
…out origin/7.0 -- invoice_line_no_picking_name'
👍 You can add OCA's logo for completion. |
4b6ea39
to
a502268
Compare
) | ||
if ref and len(ref) > 1 and ref[1]: | ||
group_id = ref[1] | ||
if group_id in user_groups: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You should use self.user_has_groups(cr, uid, 'account_invoice_line_no_picking_name.group_not_use_picking_name_per_invoice_line', context=context
(see https://github.com/odoo/odoo/blob/8.0/openerp/models.py#L1363-L1374). It calls ResUsers.has_groups()
which uses a cache for the result.
@guewen just applied your tip, very useful, thanks! |
👍 |
@guewen could you please check if PR looks good now? Thank you in advance. |
'group_not_use_picking_name_per_invoice_line', | ||
context=context | ||
): | ||
res['name'] = move.name |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This key and this value isn't already present in res ?
https://github.com/odoo/odoo/blob/8.0/addons/stock_account/stock.py#L158
@tafaRU, any news about this? |
@adrienpeiffer, you're right so this module is superfluous since 8.0. |
No description provided.