mirror of
https://github.com/OCA/rma.git
synced 2025-02-16 17:11:47 +02:00
[FIX+IMP] rma: views permissions + portal permissions + teams flow
[FIX] rma: views permissions Regular users don't have permissions to rma models, so we should avoid loading views that lead to permission errors. TT24986 rma_sale 12.0.1.1.0 [FIX] rma_sale: portal permissions Some operations need to be sudoed to be reachable by the portal user [UPD] Update rma_sale.pot rma_sale 12.0.1.1.1 Update translation files Updated by "Update PO files to match POT (msgmerge)" hook in Weblate. Translation: rma-12.0/rma-12.0-rma_sale Translate-URL: https://translation.odoo-community.org/projects/rma-12-0/rma-12-0-rma_sale/ Update translation files Updated by "Update PO files to match POT (msgmerge)" hook in Weblate. Translation: rma-12.0/rma-12.0-rma_sale Translate-URL: https://translation.odoo-community.org/projects/rma-12-0/rma-12-0-rma_sale/ [IMP] rma: teams flow - If no RMA Team is set, we'll assign a default one to the new RMA. - A sequence is now used to search for the top team and assign it. - No default user is assigned when it's not in the context (i.e. portal rmas). [UPD] Update rma_sale.pot rma_sale 12.0.1.2.0 Update translation files Updated by "Update PO files to match POT (msgmerge)" hook in Weblate. Translation: rma-12.0/rma-12.0-rma_sale Translate-URL: https://translation.odoo-community.org/projects/rma-12-0/rma-12-0-rma_sale/
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
{
|
||||
"name": "Return Merchandise Authorization Management - Link with Sales",
|
||||
"summary": "Sale Order - Return Merchandise Authorization (RMA)",
|
||||
"version": "12.0.1.0.1",
|
||||
"version": "12.0.1.2.0",
|
||||
"development_status": "Beta",
|
||||
"category": "RMA",
|
||||
"website": "https://github.com/OCA/rma",
|
||||
|
||||
@@ -25,12 +25,13 @@ class CustomerPortal(CustomerPortal):
|
||||
mapped_vals.setdefault(row, {}).update({field_name: value})
|
||||
line_vals = [(0, 0, vals) for vals in mapped_vals.values()]
|
||||
# Create wizard an generate rmas
|
||||
location_id = order_obj.browse(order_id).warehouse_id.rma_loc_id.id
|
||||
order = order_obj.browse(order_id).sudo()
|
||||
location_id = order.warehouse_id.rma_loc_id.id
|
||||
wizard = wizard_obj.with_context(active_id=order_id).create({
|
||||
'line_ids': line_vals,
|
||||
'location_id': location_id
|
||||
})
|
||||
rma = wizard.create_rma(from_portal=True)
|
||||
rma = wizard.sudo().create_rma(from_portal=True)
|
||||
for rec in rma:
|
||||
rec.origin += _(' (Portal)')
|
||||
if len(rma) == 0:
|
||||
|
||||
@@ -18,19 +18,19 @@ msgstr ""
|
||||
"X-Generator: Poedit 2.0.6\n"
|
||||
|
||||
#. module: rma_sale
|
||||
#: code:addons/rma_sale/controllers/sale_portal.py:35
|
||||
#: code:addons/rma_sale/controllers/sale_portal.py:36
|
||||
#, python-format
|
||||
msgid " (Portal)"
|
||||
msgstr ""
|
||||
|
||||
#. module: rma_sale
|
||||
#: code:addons/rma_sale/wizard/sale_order_rma_wizard.py:48
|
||||
#: code:addons/rma_sale/wizard/sale_order_rma_wizard.py:45
|
||||
#, python-format
|
||||
msgid " has been created."
|
||||
msgstr " ha sido creado."
|
||||
|
||||
#. module: rma_sale
|
||||
#: code:addons/rma_sale/wizard/sale_order_rma_wizard.py:50
|
||||
#: code:addons/rma_sale/wizard/sale_order_rma_wizard.py:47
|
||||
#, python-format
|
||||
msgid " have been created."
|
||||
msgstr " han sido creados."
|
||||
@@ -116,7 +116,6 @@ msgstr ""
|
||||
#: model:ir.model.fields,field_description:rma_sale.field_rma__allowed_picking_ids
|
||||
#: model:ir.model.fields,field_description:rma_sale.field_sale_order_line_rma_wizard__allowed_picking_ids
|
||||
#, fuzzy
|
||||
#| msgid "Picking"
|
||||
msgid "Allowed Picking"
|
||||
msgstr "Dominio de órdenes de entrega"
|
||||
|
||||
@@ -124,7 +123,6 @@ msgstr "Dominio de órdenes de entrega"
|
||||
#: model:ir.model.fields,field_description:rma_sale.field_rma__allowed_product_ids
|
||||
#: model:ir.model.fields,field_description:rma_sale.field_sale_order_line_rma_wizard__allowed_product_ids
|
||||
#, fuzzy
|
||||
#| msgid "Product"
|
||||
msgid "Allowed Product"
|
||||
msgstr "Producto"
|
||||
|
||||
|
||||
@@ -17,19 +17,19 @@ msgstr ""
|
||||
"X-Generator: Weblate 3.10\n"
|
||||
|
||||
#. module: rma_sale
|
||||
#: code:addons/rma_sale/controllers/sale_portal.py:35
|
||||
#: code:addons/rma_sale/controllers/sale_portal.py:36
|
||||
#, python-format
|
||||
msgid " (Portal)"
|
||||
msgstr " (Portal)"
|
||||
|
||||
#. module: rma_sale
|
||||
#: code:addons/rma_sale/wizard/sale_order_rma_wizard.py:48
|
||||
#: code:addons/rma_sale/wizard/sale_order_rma_wizard.py:45
|
||||
#, python-format
|
||||
msgid " has been created."
|
||||
msgstr " foi criado(a)."
|
||||
|
||||
#. module: rma_sale
|
||||
#: code:addons/rma_sale/wizard/sale_order_rma_wizard.py:50
|
||||
#: code:addons/rma_sale/wizard/sale_order_rma_wizard.py:47
|
||||
#, python-format
|
||||
msgid " have been created."
|
||||
msgstr " foi criado(a)."
|
||||
@@ -56,15 +56,19 @@ msgstr "<i class=\"fa fa-times\"/> Cancelar"
|
||||
|
||||
#. module: rma_sale
|
||||
#: model_terms:ir.ui.view,arch_db:rma_sale.sale_order_portal_content
|
||||
msgid "<span class=\"fa fa-reply\" role=\"img\" aria-label=\"RMA\" title=\"RMA\"/>"
|
||||
msgid ""
|
||||
"<span class=\"fa fa-reply\" role=\"img\" aria-label=\"RMA\" title=\"RMA\"/>"
|
||||
msgstr ""
|
||||
"<span class=\"fa fa-reply\" role=\"img\" aria-label=\"RMA\" title=\"RMA\"/>"
|
||||
|
||||
#. module: rma_sale
|
||||
#: model_terms:ir.ui.view,arch_db:rma_sale.sale_order_portal_template
|
||||
msgid "<span>\n"
|
||||
" If an RMA has already been created for a product in this sales order, it will not\n"
|
||||
" be possible to create another one from the web portal.\n"
|
||||
msgid ""
|
||||
"<span>\n"
|
||||
" If an RMA has already been created for a "
|
||||
"product in this sales order, it will not\n"
|
||||
" be possible to create another one from the "
|
||||
"web portal.\n"
|
||||
" </span>"
|
||||
msgstr ""
|
||||
"<span>\n"
|
||||
@@ -138,7 +142,9 @@ msgstr "Encerrar"
|
||||
|
||||
#. module: rma_sale
|
||||
#: model:ir.model.fields,help:rma_sale.field_sale_order_line_rma_wizard__uom_category_id
|
||||
msgid "Conversion between Units of Measure can only occur if they belong to the same category. The conversion will be made based on the ratios."
|
||||
msgid ""
|
||||
"Conversion between Units of Measure can only occur if they belong to the "
|
||||
"same category. The conversion will be made based on the ratios."
|
||||
msgstr ""
|
||||
"Uma conversão entre unidades de medida só poderá ocorrer se pertencer à "
|
||||
"mesma categoria. A conversão será feita com base nas proporções."
|
||||
|
||||
@@ -14,19 +14,19 @@ msgstr ""
|
||||
"Plural-Forms: \n"
|
||||
|
||||
#. module: rma_sale
|
||||
#: code:addons/rma_sale/controllers/sale_portal.py:35
|
||||
#: code:addons/rma_sale/controllers/sale_portal.py:36
|
||||
#, python-format
|
||||
msgid " (Portal)"
|
||||
msgstr ""
|
||||
|
||||
#. module: rma_sale
|
||||
#: code:addons/rma_sale/wizard/sale_order_rma_wizard.py:48
|
||||
#: code:addons/rma_sale/wizard/sale_order_rma_wizard.py:45
|
||||
#, python-format
|
||||
msgid " has been created."
|
||||
msgstr ""
|
||||
|
||||
#. module: rma_sale
|
||||
#: code:addons/rma_sale/wizard/sale_order_rma_wizard.py:50
|
||||
#: code:addons/rma_sale/wizard/sale_order_rma_wizard.py:47
|
||||
#, python-format
|
||||
msgid " have been created."
|
||||
msgstr ""
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
<field name="name">sale.order.form.inherit</field>
|
||||
<field name="model">sale.order</field>
|
||||
<field name="inherit_id" ref="sale.view_order_form"/>
|
||||
<field name="groups_id" eval="[(4, ref('rma.rma_group_user_own'))]"/>
|
||||
<field name="arch" type="xml">
|
||||
<button name="action_done" position="after">
|
||||
<button name="action_create_rma"
|
||||
|
||||
@@ -29,9 +29,6 @@ class SaleOrderRmaWizard(models.TransientModel):
|
||||
default=lambda r: r.order_id.warehouse_id.rma_loc_id.id,
|
||||
)
|
||||
|
||||
def create_rma_from_portal(self):
|
||||
self.ensure_one()
|
||||
|
||||
def create_rma(self, from_portal=None):
|
||||
self.ensure_one()
|
||||
lines = self.line_ids.filtered(lambda r: r.quantity > 0.0)
|
||||
|
||||
Reference in New Issue
Block a user