Skip to content

Commit

Permalink
[MIG] purchase_ux: Migration to 16.0
Browse files Browse the repository at this point in the history
  • Loading branch information
matiasperalta1 authored and augusto-weiss committed Jan 12, 2023
1 parent 0ffabe0 commit d585dff
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 7 deletions.
15 changes: 8 additions & 7 deletions purchase_stock_ux/models/purchase_order.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,13 +80,14 @@ def create(self, vals_list):
return super().create(vals_list)

@api.model
def check_force_delivered_status(self, vals):
if vals.get('force_delivered_status') and not self.user_has_groups(
'base.group_system'):
group = self.env.ref('base.group_system').sudo()
raise UserError(_(
'Only users with "%s / %s" can Set Received manually') % (
group.category_id.name, group.name))
def check_force_delivered_status(self, vals_list):
if not self.user_has_groups('base.group_system'):
for vals in vals_list:
if vals.get('force_delivered_status'):
group = self.env.ref('base.group_system').sudo()
raise UserError(_(
'Only users with "%s / %s" can Set Received manually') % (
group.category_id.name, group.name))

def button_cancel(self):
self = self.with_context(cancel_from_order=True)
Expand Down
6 changes: 6 additions & 0 deletions purchase_ux/i18n/es.po
Original file line number Diff line number Diff line change
Expand Up @@ -325,6 +325,12 @@ msgstr ""
msgid "Quotations"
msgstr "Presupuestos"

#. module: purchase_ux
#: model_terms:ir.ui.menu,name:purchase.menu_purchase_rfq
#: model_terms:ir.actions.act_window,name:purchase.purchase_rfq
msgid "Purchase Orders"
msgstr "Pedidos de compra"

#. module: purchase_ux
#: model:ir.model.fields,help:purchase_ux.field_purchase_change_currency__currency_rate
msgid "Select a currency rate to apply on the purchase order"
Expand Down

0 comments on commit d585dff

Please sign in to comment.