Skip to content

[6788][ADD] maintenance_equipment_additional_attributes: add specific attributes to maintenance equipment - #9

Open
smorita7749 wants to merge 13 commits into
18.0from
6788-add-maintenance_equipment_additional_attributes
Open

[6788][ADD] maintenance_equipment_additional_attributes: add specific attributes to maintenance equipment#9
smorita7749 wants to merge 13 commits into
18.0from
6788-add-maintenance_equipment_additional_attributes

Conversation

@smorita7749

@smorita7749 smorita7749 commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

QT6788

Add a new module that extends maintenance.equipment with RBKK-specific attributes:

  • Set Name (Char)
  • General Name (Many2one master, creatable inline; managed under Maintenance / Configuration)
  • National Project ID (Many2one master; managed under Maintenance / Configuration)
  • Fixed Asset flag + Fixed Asset Code (shown only when Fixed Asset is set)
  • GMP flag + GMP Function (Manufacturing / QC) + GMP Category (A / B / C), shown only when GMP is set
  • Measuring Instrument flag
  • Used in location (Many2one stock.location, internal locations only, tracked) — replaces the base free-text location on the form
  • Manufacturer (Char)
  • Acquisition Date (Date)

Includes Japanese translation (i18n/ja.po).

…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
…layout

These two modules were dropped by the ours-style merge c2fe042 ("fixup!"),
which recorded 54185f3 as a parent but kept only the feature branch tree.
Recover them unchanged from 54185f3.
…ription

Also dropped by the ours-merge c2fe042: test-requirements.txt (test dep
stock_reporting_access needed by stock_location_report_manager_layout) and
the regenerated purchase_security_adjust static description. Recover from 54185f3.
@smorita7749
smorita7749 force-pushed the 6788-add-maintenance_equipment_additional_attributes branch from 8056cb8 to f455cb1 Compare July 16, 2026 01:18
@smorita7749
smorita7749 force-pushed the 6788-add-maintenance_equipment_additional_attributes branch from f455cb1 to 66565d6 Compare July 22, 2026 10:43
@smorita7749
smorita7749 force-pushed the 6788-add-maintenance_equipment_additional_attributes branch from 159c59f to d254fa3 Compare July 23, 2026 15:27
@smorita7749

Copy link
Copy Markdown
Contributor Author

Add ja.po

Translation notes

Translations are referenced from existing Odoo translations where available (odoo/maintenance, odoo/purchase).

The following terms have no reference and are translated independently:

msgid msgstr
Alert Period アラート期間
Alert Period Uom アラート期間の単位
Alert Sent アラート送信済み
Amount of time before the scheduled date at which the responsible user should be alerted about this maintenance. 予定日より前に担当者へアラートを通知する期間。

Comment thread maintenance_additional_attributes/models/maintenance_equipment.py
Comment thread maintenance_additional_attributes/models/maintenance_request.py Outdated
Comment thread maintenance_additional_attributes/models/maintenance_request.py Outdated
- Rename alert_period_uom to alert_period_unit
- Add unique name constraint on equipment department and general name
- Simplify alert_sent field definition
Comment thread maintenance_additional_attributes/models/maintenance_equipment.py
Comment on lines +10 to +22
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)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is the purpose of these fields? Don't we need any action method?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is to make to-do activities via cron managed in the settings in UI.
I recorded the cron in the ticket.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there any reason to create cron manually instead of adding in the module?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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" />

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also add active field with boolean_toggle widget.

Comment on lines +12 to +24
<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>

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Editable list view is enough.

Suggested change
<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>

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
<field name="view_mode">list,form</field>
<field name="view_mode">list</field>

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as above.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants