Skip to content

Commit

Permalink
[IMP] purchase_request: Add Approver user to requests
Browse files Browse the repository at this point in the history
TT51248
  • Loading branch information
victoralmau committed Oct 22, 2024
1 parent e13d1a3 commit ed12e9a
Show file tree
Hide file tree
Showing 19 changed files with 529 additions and 232 deletions.
5 changes: 5 additions & 0 deletions purchase_request/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,11 @@ Lines.

It is possible to filter requests by its approval status.

Known issues / Roadmap
======================

Add approver by employee (``hr_purchase_request``).

Bug Tracker
===========

Expand Down
1 change: 1 addition & 0 deletions purchase_request/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
"views/purchase_order_view.xml",
"views/stock_move_views.xml",
"views/stock_picking_views.xml",
"views/res_config_settings_views.xml",
],
"demo": ["demo/purchase_request_demo.xml"],
"license": "LGPL-3",
Expand Down
115 changes: 69 additions & 46 deletions purchase_request/i18n/es.po
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ msgstr ""
"Language: es\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
"X-Generator: Weblate 5.6.2\n"

Expand Down Expand Up @@ -58,6 +58,11 @@ msgstr ""
"<li><b>%(product_name)s</b>: Cantidad transferida %(product_qty)s "
"%(product_uom)s</li>"

#. module: purchase_request
#: model_terms:ir.ui.view,arch_db:purchase_request.res_config_settings_view_form
msgid "<span class=\"o_form_label\">Default approver</span>"
msgstr ""

#. module: purchase_request
#: model_terms:ir.ui.view,arch_db:purchase_request.report_purchase_request
msgid "<strong>Analytic Distribution</strong>"
Expand Down Expand Up @@ -258,9 +263,20 @@ msgstr "Aprobado"

#. module: purchase_request
#: model:ir.model.fields,field_description:purchase_request.field_purchase_request__assigned_to
#: model_terms:ir.ui.view,arch_db:purchase_request.view_purchase_request_search
msgid "Approver"
msgstr "Autorizador"

#. module: purchase_request
#: model:ir.model.fields,field_description:purchase_request.field_purchase_request__approver_user_id
msgid "Approver user"
msgstr "Aprobador"

#. module: purchase_request
#: model_terms:ir.ui.view,arch_db:purchase_request.res_config_settings_view_form
msgid "Aprrover"
msgstr "Aprobador"

#. module: purchase_request
#: model:ir.model.fields,field_description:purchase_request.field_purchase_request_line__assigned_to
#: model_terms:ir.ui.view,arch_db:purchase_request.purchase_request_line_search
Expand Down Expand Up @@ -330,13 +346,28 @@ msgstr ""
msgid "Click to start a new purchase request process."
msgstr "Haga clic para iniciar un nuevo proceso de solicitud de compra."

#. module: purchase_request
#: model:ir.model,name:purchase_request.model_res_company
msgid "Companies"
msgstr "Compañías"

#. module: purchase_request
#: model:ir.model.fields,field_description:purchase_request.field_purchase_request__company_id
#: model:ir.model.fields,field_description:purchase_request.field_purchase_request_allocation__company_id
#: model:ir.model.fields,field_description:purchase_request.field_purchase_request_line__company_id
msgid "Company"
msgstr "Compañía"

#. module: purchase_request
#: model:ir.model,name:purchase_request.model_res_config_settings
msgid "Config Settings"
msgstr "Ajustes de configuración"

#. module: purchase_request
#: model:ir.ui.menu,name:purchase_request.menu_purchase_request_config
msgid "Configuration"
msgstr "Configuración"

#. module: purchase_request
#: model:ir.model.fields,help:purchase_request.field_purchase_request_line__product_uom_category_id
msgid ""
Expand Down Expand Up @@ -500,6 +531,12 @@ msgstr ""
"Desde la última recepción esta cantidad ha sido asignada a esta solicitud de "
"compra"

#. module: purchase_request
#: model:ir.actions.act_window,name:purchase_request.action_purchase_request_settings_general
#: model:ir.ui.menu,name:purchase_request.menu_purchase_request_config_settings_general
msgid "General Settings"
msgstr "Opciones generales"

#. module: purchase_request
#: model_terms:ir.ui.view,arch_db:purchase_request.purchase_order_line_search_sub
msgid "Group By"
Expand Down Expand Up @@ -567,6 +604,11 @@ msgstr "En Progreso"
msgid "In progress"
msgstr "En Progreso"

#. module: purchase_request
#: model:ir.model.fields,field_description:purchase_request.field_purchase_request__is_approvable
msgid "Is Approvable"
msgstr ""

#. module: purchase_request
#: model:ir.model.fields,field_description:purchase_request.field_purchase_request__is_editable
#: model:ir.model.fields,field_description:purchase_request.field_purchase_request_line__is_editable
Expand Down Expand Up @@ -660,6 +702,11 @@ msgstr "Regla de inventario mínimo"
msgid "My Activity Deadline"
msgstr "Fecha límite de mi actividad"

#. module: purchase_request
#: model_terms:ir.ui.view,arch_db:purchase_request.view_purchase_request_search
msgid "My assigned approvals"
msgstr ""

#. module: purchase_request
#: model_terms:ir.ui.view,arch_db:purchase_request.purchase_request_line_search
#: model_terms:ir.ui.view,arch_db:purchase_request.view_purchase_request_search
Expand Down Expand Up @@ -899,6 +946,12 @@ msgstr "Asignación de Solicitud de Compra"
msgid "Purchase Request Allocations"
msgstr "Asignaciones de Solicitudes de Compra"

#. module: purchase_request
#: model:ir.model.fields,field_description:purchase_request.field_res_company__purchase_request_approver_user_id
#: model:ir.model.fields,field_description:purchase_request.field_res_config_settings__purchase_request_approver_user_id
msgid "Purchase Request Approver User"
msgstr ""

#. module: purchase_request
#: model:ir.model,name:purchase_request.model_purchase_request_line
#: model:ir.model.fields,field_description:purchase_request.field_purchase_request_allocation__purchase_request_line_id
Expand Down Expand Up @@ -981,6 +1034,7 @@ msgstr "Solicitud de compra que debe aprobarse"
#: model:ir.ui.menu,name:purchase_request.menu_purchase_request_act
#: model:ir.ui.menu,name:purchase_request.menu_purchase_request_pro_mgt
#: model:ir.ui.menu,name:purchase_request.parent_menu_purchase_request
#: model_terms:ir.ui.view,arch_db:purchase_request.res_config_settings_view_form
msgid "Purchase Requests"
msgstr "Solicitudes de Compra"

Expand Down Expand Up @@ -1374,11 +1428,6 @@ msgstr "Hay alguna cantidad pendiente por comprar"
msgid "To Approve"
msgstr "A aprobar"

#. module: purchase_request
#: model:ir.model.fields,field_description:purchase_request.field_purchase_request__to_approve_allowed
msgid "To Approve Allowed"
msgstr "Permitido para Aprobar"

#. module: purchase_request
#: model:ir.model.fields.selection,name:purchase_request.selection__purchase_request__state__to_approve
msgid "To be approved"
Expand Down Expand Up @@ -1460,6 +1509,20 @@ msgstr ""
msgid "Wizard"
msgstr "Asistente"

#. module: purchase_request
#. odoo-python
#: code:addons/purchase_request/models/purchase_request.py:0
#, python-format
msgid "You are not allowed to approve this request."
msgstr ""

#. module: purchase_request
#. odoo-python
#: code:addons/purchase_request/models/purchase_request.py:0
#, python-format
msgid "You are not allowed to reject this request."
msgstr ""

#. module: purchase_request
#. odoo-python
#: code:addons/purchase_request/models/purchase_request_line.py:0
Expand Down Expand Up @@ -1527,43 +1590,3 @@ msgstr "Debe seleccionar líneas del mismo tipo de recogida."
#, python-format
msgid "You have to select lines from the same company."
msgstr "Debe seleccionar líneas de la misma compañía."

#~ msgid "SMS Delivery error"
#~ msgstr "Error en la entrega de SMS"

#~ msgid "Number of messages which requires an action"
#~ msgstr "Número de mensajes que requieren una acción"

#~ msgid "<strong>Analytic Account</strong>"
#~ msgstr "<strong>Cuenta analítica</strong>"

#~ msgid "Analytic Account"
#~ msgstr "Cuenta analítica"

#, fuzzy
#~ msgid "Number of unread messages"
#~ msgstr "Mensajes no leídos"

#, fuzzy
#~ msgid "Product Template"
#~ msgstr "Producto"

#, fuzzy
#~ msgid "Unread Messages Counter"
#~ msgstr "Mensajes no leídos"

#~ msgid "<li><b>%s</b>: Ordered quantity %s %s, Planned date %s</li>"
#~ msgstr "<li><b>%s</b>: Cantidad pedida %s %s, Fecha planificada %s</li>"

#~ msgid "<li><b>%s</b>: Received quantity %s %s</li>"
#~ msgstr "<li><b>%s</b>: Cantidad recibida %s %s</li>"

#~ msgid "<li><b>%s</b>: Transferred quantity %s %s</li>"
#~ msgstr "<li><b>%s</b>: Cantidad transferida %s %s</li>"

#~ msgid "Product Unit of Measure"
#~ msgstr "Unidad de medida"

#, fuzzy
#~ msgid "Procurement Rule"
#~ msgstr "Abastecimiento"
75 changes: 70 additions & 5 deletions purchase_request/i18n/purchase_request.pot
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 16.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2024-10-18 07:50+0000\n"
"PO-Revision-Date: 2024-10-18 07:50+0000\n"
"Last-Translator: \n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
Expand Down Expand Up @@ -42,6 +44,11 @@ msgid ""
"%(product_uom)s</li>"
msgstr ""

#. module: purchase_request
#: model_terms:ir.ui.view,arch_db:purchase_request.res_config_settings_view_form
msgid "<span class=\"o_form_label\">Default approver</span>"
msgstr ""

#. module: purchase_request
#: model_terms:ir.ui.view,arch_db:purchase_request.report_purchase_request
msgid "<strong>Analytic Distribution</strong>"
Expand Down Expand Up @@ -222,9 +229,20 @@ msgstr ""

#. module: purchase_request
#: model:ir.model.fields,field_description:purchase_request.field_purchase_request__assigned_to
#: model_terms:ir.ui.view,arch_db:purchase_request.view_purchase_request_search
msgid "Approver"
msgstr ""

#. module: purchase_request
#: model:ir.model.fields,field_description:purchase_request.field_purchase_request__approver_user_id
msgid "Approver user"
msgstr ""

#. module: purchase_request
#: model_terms:ir.ui.view,arch_db:purchase_request.res_config_settings_view_form
msgid "Aprrover"
msgstr ""

#. module: purchase_request
#: model:ir.model.fields,field_description:purchase_request.field_purchase_request_line__assigned_to
#: model_terms:ir.ui.view,arch_db:purchase_request.purchase_request_line_search
Expand Down Expand Up @@ -292,13 +310,28 @@ msgstr ""
msgid "Click to start a new purchase request process."
msgstr ""

#. module: purchase_request
#: model:ir.model,name:purchase_request.model_res_company
msgid "Companies"
msgstr ""

#. module: purchase_request
#: model:ir.model.fields,field_description:purchase_request.field_purchase_request__company_id
#: model:ir.model.fields,field_description:purchase_request.field_purchase_request_allocation__company_id
#: model:ir.model.fields,field_description:purchase_request.field_purchase_request_line__company_id
msgid "Company"
msgstr ""

#. module: purchase_request
#: model:ir.model,name:purchase_request.model_res_config_settings
msgid "Config Settings"
msgstr ""

#. module: purchase_request
#: model:ir.ui.menu,name:purchase_request.menu_purchase_request_config
msgid "Configuration"
msgstr ""

#. module: purchase_request
#: model:ir.model.fields,help:purchase_request.field_purchase_request_line__product_uom_category_id
msgid ""
Expand Down Expand Up @@ -457,6 +490,12 @@ msgid ""
"request"
msgstr ""

#. module: purchase_request
#: model:ir.actions.act_window,name:purchase_request.action_purchase_request_settings_general
#: model:ir.ui.menu,name:purchase_request.menu_purchase_request_config_settings_general
msgid "General Settings"
msgstr ""

#. module: purchase_request
#: model_terms:ir.ui.view,arch_db:purchase_request.purchase_order_line_search_sub
msgid "Group By"
Expand Down Expand Up @@ -524,6 +563,11 @@ msgstr ""
msgid "In progress"
msgstr ""

#. module: purchase_request
#: model:ir.model.fields,field_description:purchase_request.field_purchase_request__is_approvable
msgid "Is Approvable"
msgstr ""

#. module: purchase_request
#: model:ir.model.fields,field_description:purchase_request.field_purchase_request__is_editable
#: model:ir.model.fields,field_description:purchase_request.field_purchase_request_line__is_editable
Expand Down Expand Up @@ -617,6 +661,11 @@ msgstr ""
msgid "My Activity Deadline"
msgstr ""

#. module: purchase_request
#: model_terms:ir.ui.view,arch_db:purchase_request.view_purchase_request_search
msgid "My assigned approvals"
msgstr ""

#. module: purchase_request
#: model_terms:ir.ui.view,arch_db:purchase_request.purchase_request_line_search
#: model_terms:ir.ui.view,arch_db:purchase_request.view_purchase_request_search
Expand Down Expand Up @@ -858,6 +907,12 @@ msgstr ""
msgid "Purchase Request Allocations"
msgstr ""

#. module: purchase_request
#: model:ir.model.fields,field_description:purchase_request.field_res_company__purchase_request_approver_user_id
#: model:ir.model.fields,field_description:purchase_request.field_res_config_settings__purchase_request_approver_user_id
msgid "Purchase Request Approver User"
msgstr ""

#. module: purchase_request
#: model:ir.model,name:purchase_request.model_purchase_request_line
#: model:ir.model.fields,field_description:purchase_request.field_purchase_request_allocation__purchase_request_line_id
Expand Down Expand Up @@ -940,6 +995,7 @@ msgstr ""
#: model:ir.ui.menu,name:purchase_request.menu_purchase_request_act
#: model:ir.ui.menu,name:purchase_request.menu_purchase_request_pro_mgt
#: model:ir.ui.menu,name:purchase_request.parent_menu_purchase_request
#: model_terms:ir.ui.view,arch_db:purchase_request.res_config_settings_view_form
msgid "Purchase Requests"
msgstr ""

Expand Down Expand Up @@ -1313,11 +1369,6 @@ msgstr ""
msgid "To Approve"
msgstr ""

#. module: purchase_request
#: model:ir.model.fields,field_description:purchase_request.field_purchase_request__to_approve_allowed
msgid "To Approve Allowed"
msgstr ""

#. module: purchase_request
#: model:ir.model.fields.selection,name:purchase_request.selection__purchase_request__state__to_approve
msgid "To be approved"
Expand Down Expand Up @@ -1397,6 +1448,20 @@ msgstr ""
msgid "Wizard"
msgstr ""

#. module: purchase_request
#. odoo-python
#: code:addons/purchase_request/models/purchase_request.py:0
#, python-format
msgid "You are not allowed to approve this request."
msgstr ""

#. module: purchase_request
#. odoo-python
#: code:addons/purchase_request/models/purchase_request.py:0
#, python-format
msgid "You are not allowed to reject this request."
msgstr ""

#. module: purchase_request
#. odoo-python
#: code:addons/purchase_request/models/purchase_request_line.py:0
Expand Down
2 changes: 2 additions & 0 deletions purchase_request/models/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
from . import orderpoint
from . import purchase_request
from . import purchase_request_line
from . import res_company
from . import res_config_settings
from . import stock_rule
from . import product_template
from . import purchase_order
Expand Down
Loading

0 comments on commit ed12e9a

Please sign in to comment.