-
Notifications
You must be signed in to change notification settings - Fork 69
[ADD] portal_sale_distributor_mrp_subcontracting: new moudle #1492
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
base: 18.0
Are you sure you want to change the base?
Conversation
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.
Pull request overview
Este PR añade un nuevo módulo portal_sale_distributor_mrp_subcontracting que extiende la funcionalidad del portal de distribuidores para trabajar con subcontratación MRP. El módulo proporciona reglas de acceso a modelos de almacén, unidades de medida y ubicaciones de stock para usuarios distribuidores del portal.
Cambios principales
- Nuevo módulo auto-instalable que integra
portal_sale_distributorconmrp_subcontracting - Tres reglas de seguridad para modelos: almacenes, unidades de medida y ubicaciones de stock
- Documentación y archivos de traducción básicos
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 13 comments.
Show a summary per file
| File | Description |
|---|---|
__manifest__.py |
Define el nuevo módulo con dependencias a mrp_subcontracting y portal_sale_distributor |
security/portal_sale_distributor_security.xml |
Añade tres reglas de acceso para modelos relacionados con subcontratación |
i18n/es.po |
Archivo de traducción al español (vacío de contenido traducible) |
__init__.py |
Archivo de inicialización estándar del módulo |
README.rst |
Documentación del módulo con instrucciones de instalación y uso |
| <record id="portal_sale_order_user_rule" model="ir.rule"> | ||
| <field name="name">Portal Distributor Warehouses Subcontractor</field> | ||
| <field name="model_id" ref="stock.model_stock_warehouse"/> | ||
| <field name="domain_force">[(1 ,'=', 1)]</field> | ||
| <field name="groups" eval="[(4, ref('group_portal_backend_distributor'))]"/> | ||
| <field eval="1" name="perm_unlink"/> | ||
| <field eval="0" name="perm_write"/> | ||
| <field eval="0" name="perm_read"/> | ||
| <field eval="0" name="perm_create"/> | ||
| </record> | ||
|
|
||
| <!-- Sale Portal Distributor CRUD for UoM Subcontractor with MRP Subcontrating --> | ||
| <record id="portal_sale_order_user_rule" model="ir.rule"> | ||
| <field name="name">Portal Distributor UoM Subcontractor</field> | ||
| <field name="model_id" ref="uom.model_uom_uom"/> | ||
| <field name="domain_force">[(1 ,'=', 1)]</field> | ||
| <field name="groups" eval="[(4, ref('group_portal_backend_distributor'))]"/> | ||
| <field eval="1" name="perm_unlink"/> | ||
| <field eval="0" name="perm_write"/> | ||
| <field eval="0" name="perm_read"/> | ||
| <field eval="0" name="perm_create"/> | ||
| </record> | ||
|
|
||
| <!-- Sale Portal Distributor CRUD for UoM Subcontractor with MRP Subcontrating --> | ||
| <record id="portal_sale_order_user_rule" model="ir.rule"> | ||
| <field name="name">Portal Distributor UoM Subcontractor</field> | ||
| <field name="model_id" ref="stock.model_stock_location"/> | ||
| <field name="domain_force">[(1 ,'=', 1)]</field> | ||
| <field name="groups" eval="[(4, ref('group_portal_backend_distributor'))]"/> | ||
| <field eval="1" name="perm_unlink"/> | ||
| <field eval="0" name="perm_write"/> | ||
| <field eval="0" name="perm_read"/> | ||
| <field eval="0" name="perm_create"/> | ||
| </record> |
Copilot
AI
Dec 3, 2025
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.
Los tres registros de reglas de seguridad tienen el mismo ID XML portal_sale_order_user_rule, lo que causará un conflicto. Cada registro debe tener un ID único. Sugerencia:
- Primera regla:
portal_warehouse_subcontractor_rule - Segunda regla:
portal_uom_subcontractor_rule - Tercera regla:
portal_stock_location_subcontractor_rule
| <field eval="1" name="perm_unlink"/> | ||
| <field eval="0" name="perm_write"/> | ||
| <field eval="0" name="perm_read"/> | ||
| <field eval="0" name="perm_create"/> |
Copilot
AI
Dec 3, 2025
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.
Los permisos configurados para esta regla son contradictorios: todos los permisos están en 0 excepto perm_unlink que está en 1. Esto significa que los usuarios solo pueden eliminar registros pero no pueden leerlos, crearlos ni modificarlos. Normalmente, si se necesita acceso de lectura para permitir operaciones relacionadas con subcontratación, debería ser perm_read=1 y perm_unlink=0. Verificar cuál es el comportamiento deseado.
| <!-- Sale Portal Distributor CRUD for UoM Subcontractor with MRP Subcontrating --> | ||
| <record id="portal_sale_order_user_rule" model="ir.rule"> | ||
| <field name="name">Portal Distributor UoM Subcontractor</field> |
Copilot
AI
Dec 3, 2025
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.
El comentario indica "UoM Subcontractor" pero el modelo referenciado es stock.model_stock_location (ubicaciones de stock), no UoM. El comentario debería ser algo como "Portal Distributor Stock Location Subcontractor" para que coincida con el modelo real.
| <!-- Sale Portal Distributor CRUD for UoM Subcontractor with MRP Subcontrating --> | |
| <record id="portal_sale_order_user_rule" model="ir.rule"> | |
| <field name="name">Portal Distributor UoM Subcontractor</field> | |
| <!-- Sale Portal Distributor CRUD for Stock Location Subcontractor with MRP Subcontracting --> | |
| <record id="portal_sale_order_user_rule" model="ir.rule"> | |
| <field name="name">Portal Distributor Stock Location Subcontractor</field> |
| <field eval="1" name="perm_unlink"/> | ||
| <field eval="0" name="perm_write"/> | ||
| <field eval="0" name="perm_read"/> | ||
| <field eval="0" name="perm_create"/> |
Copilot
AI
Dec 3, 2025
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.
Los permisos configurados para esta regla son contradictorios: todos los permisos están en 0 excepto perm_unlink que está en 1. Esto significa que los usuarios solo pueden eliminar registros pero no pueden leerlos, crearlos ni modificarlos. Normalmente, si se necesita acceso de lectura para permitir operaciones relacionadas con subcontratación, debería ser perm_read=1 y perm_unlink=0. Verificar cuál es el comportamiento deseado.
| <field eval="0" name="perm_create"/> | ||
| </record> | ||
|
|
||
| <!-- Sale Portal Distributor CRUD for UoM Subcontractor with MRP Subcontrating --> |
Copilot
AI
Dec 3, 2025
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.
Error ortográfico en el comentario: "Subcontrating" debería ser "Subcontracting".
| <?xml version="1.0" encoding="utf-8"?> | ||
| <odoo noupdate="1"> | ||
|
|
||
| <!-- Sale Portal Distributor CRUD for Stock Warehouse with MRP Subcontrating --> |
Copilot
AI
Dec 3, 2025
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.
Error ortográfico en el título del PR: "moudle" debería ser "module".
| <field name="name">Portal Distributor Warehouses Subcontractor</field> | ||
| <field name="model_id" ref="stock.model_stock_warehouse"/> | ||
| <field name="domain_force">[(1 ,'=', 1)]</field> | ||
| <field name="groups" eval="[(4, ref('group_portal_backend_distributor'))]"/> |
Copilot
AI
Dec 3, 2025
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.
La referencia al grupo group_portal_backend_distributor no incluye el módulo de origen. Debería ser ref('portal_sale_distributor.group_portal_backend_distributor') para referenciar correctamente el grupo definido en el módulo de dependencia.
| <field name="name">Portal Distributor UoM Subcontractor</field> | ||
| <field name="model_id" ref="stock.model_stock_location"/> | ||
| <field name="domain_force">[(1 ,'=', 1)]</field> | ||
| <field name="groups" eval="[(4, ref('group_portal_backend_distributor'))]"/> |
Copilot
AI
Dec 3, 2025
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.
La referencia al grupo group_portal_backend_distributor no incluye el módulo de origen. Debería ser ref('portal_sale_distributor.group_portal_backend_distributor') para referenciar correctamente el grupo definido en el módulo de dependencia.
| Portal Distributor Sale with MRP | ||
| ================================ | ||
|
|
||
| This module integrate portal sale distributor using MRP. |
Copilot
AI
Dec 3, 2025
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.
Error ortográfico: "integrate" debería ser "integrates" para concordar con el sujeto singular "module".
| This module integrate portal sale distributor using MRP. | |
| This module integrates portal sale distributor using MRP. |
|
|
||
| This module integrate portal sale distributor using MRP. | ||
|
|
||
| #. Add a model access rule in order to able portal distributor users to add products in sale orders. |
Copilot
AI
Dec 3, 2025
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.
Error ortográfico: "able" debería ser "enable" (habilitar) en este contexto. "Able" es un adjetivo, mientras que se necesita un verbo.
| #. Add a model access rule in order to able portal distributor users to add products in sale orders. | |
| #. Add a model access rule in order to enable portal distributor users to add products in sale orders. |
cbbeaaa to
e7e1363
Compare

No description provided.