[6788][ADD] maintenance_equipment_additional_attributes: add specific attributes to maintenance equipment - #9
Conversation
…butes to maintenance equipment Extend maintenance.equipment with RBKK-specific attributes: set name, general name (master), national project (master), fixed asset flag/code, GMP flag with function and category, measuring instrument flag, location in use (stock.location), manufacturer and acquisition date. task-6788
8056cb8 to
f455cb1
Compare
f455cb1 to
66565d6
Compare
159c59f to
d254fa3
Compare
|
Add ja.po Translation notesTranslations are referenced from existing Odoo translations where available (odoo/maintenance, odoo/purchase). The following terms have no reference and are translated independently:
|
- Rename alert_period_uom to alert_period_unit - Add unique name constraint on equipment department and general name - Simplify alert_sent field definition
| alert_period = fields.Integer( | ||
| help="Amount of time before the scheduled date at which the " | ||
| "responsible user should be alerted about this maintenance.", | ||
| ) | ||
| alert_period_unit = fields.Selection( | ||
| selection=[ | ||
| ("day", "Days"), | ||
| ("week", "Weeks"), | ||
| ("month", "Months"), | ||
| ], | ||
| default="month", | ||
| ) | ||
| alert_sent = fields.Boolean(copy=False) |
There was a problem hiding this comment.
What is the purpose of these fields? Don't we need any action method?
There was a problem hiding this comment.
This is to make to-do activities via cron managed in the settings in UI.
I recorded the cron in the ticket.
There was a problem hiding this comment.
Is there any reason to create cron manually instead of adding in the module?
There was a problem hiding this comment.
I think adding this module is out of range, and cutting out to another module is too much.
Is it acceptable to add it to this module?
There was a problem hiding this comment.
The purpose of those fields are for sending alert to the user. So, having the fields but not having action is a bit strange. In my opinion, it is okay to add it in this module but you can also create a separate module for these fields and action. You can ask advice with claude.
| <field name="model">maintenance.equipment.department</field> | ||
| <field name="arch" type="xml"> | ||
| <list editable="bottom"> | ||
| <field name="name" /> |
There was a problem hiding this comment.
Also add active field with boolean_toggle widget.
| <record id="maintenance_equipment_department_view_form" model="ir.ui.view"> | ||
| <field name="name">maintenance.equipment.department.form</field> | ||
| <field name="model">maintenance.equipment.department</field> | ||
| <field name="arch" type="xml"> | ||
| <form> | ||
| <sheet> | ||
| <group> | ||
| <field name="name" /> | ||
| </group> | ||
| </sheet> | ||
| </form> | ||
| </field> | ||
| </record> |
There was a problem hiding this comment.
Editable list view is enough.
| <record id="maintenance_equipment_department_view_form" model="ir.ui.view"> | |
| <field name="name">maintenance.equipment.department.form</field> | |
| <field name="model">maintenance.equipment.department</field> | |
| <field name="arch" type="xml"> | |
| <form> | |
| <sheet> | |
| <group> | |
| <field name="name" /> | |
| </group> | |
| </sheet> | |
| </form> | |
| </field> | |
| </record> |
| <record id="maintenance_equipment_department_action" model="ir.actions.act_window"> | ||
| <field name="name">Departments</field> | ||
| <field name="res_model">maintenance.equipment.department</field> | ||
| <field name="view_mode">list,form</field> |
There was a problem hiding this comment.
| <field name="view_mode">list,form</field> | |
| <field name="view_mode">list</field> |
QT6788
Add a new module that extends
maintenance.equipmentwith RBKK-specific attributes:stock.location, internal locations only, tracked) — replaces the base free-text location on the formIncludes Japanese translation (
i18n/ja.po).