[6788][ADD] maintenance_additional_attributes: add specific attributes - #9
[6788][ADD] maintenance_additional_attributes: add specific attributes#9smorita7749 wants to merge 16 commits into
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
| <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> |
0b371d3 to
36d5f1e
Compare
|
Pushed Close date can now be recorded before completionThe form already exposed
Maintenance alert fixes
Views
TestsAdds |
| # No date was ever recorded: let the standard behavior of | ||
| # stamping the completion date apply. | ||
| continue | ||
| close_date = fields.Date.to_date(close_date) |
There was a problem hiding this comment.
Why is this needed?
| def _cron_send_maintenance_alerts(self): | ||
| requests = self.search( | ||
| [ | ||
| ("archive", "=", False), |
There was a problem hiding this comment.
Does it need? Doesn't odoo search for active record?
There was a problem hiding this comment.
This is needed. maintenance.request has no active field and uses an archive bool instead, so active_test doesn't apply and archived records are returned by search().
Also, cancelling a request doesn't change its stage, so without this condition alerts would be sent for cancelled requests.
|
Pushed Reworked how the close date is protected in Instead of letting the standard behavior rewrite This removes the snapshot dictionary, the three-way branch, the Also added a regression test for the context leak this uncovered: Tests: 12 passed, 0 failed. |
Add is_national_project (Boolean) and rename national_project to national_project_name, which is now only shown when the flag is set, following the fixed asset and GMP fields.
National project is now gated by a flagThe national project was a bare
The module is not deployed yet, so the rename needs no data migration. No search filter was added for the flag; happy to add one alongside Fixed Asset / GMP / Measuring Instrument if that is wanted. Pushed |
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).