Skip to content
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

[14.0][UPD] warranty: modif total amount #1734

Merged
merged 1 commit into from
Aug 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ addon | version | maintainers | summary | price
[deltatech_service_consumable](deltatech_service_consumable/) | 14.0.1.1.3 | [![dhongu](https:/dhongu.png?size=30px)](https:/dhongu) | Service Consumable | Free
[deltatech_service_equipment](deltatech_service_equipment/) | 14.0.1.2.0 | [![dhongu](https:/dhongu.png?size=30px)](https:/dhongu) | Service Equipment Management | Free
[deltatech_service_equipment_base](deltatech_service_equipment_base/) | 14.0.1.1.3 | [![dhongu](https:/dhongu.png?size=30px)](https:/dhongu) | Service Equipment Management | Free
[deltatech_service_maintenance](deltatech_service_maintenance/) | 14.0.1.1.6 | [![dhongu](https:/dhongu.png?size=30px)](https:/dhongu) | Services Maintenance | Free
[deltatech_service_maintenance](deltatech_service_maintenance/) | 14.0.1.1.7 | [![dhongu](https:/dhongu.png?size=30px)](https:/dhongu) | Services Maintenance | Free
[deltatech_service_maintenance_agreement](deltatech_service_maintenance_agreement/) | 14.0.1.0.4 | [![dhongu](https:/dhongu.png?size=30px)](https:/dhongu) | Services Maintenance | Free
[deltatech_service_maintenance_plan](deltatech_service_maintenance_plan/) | 14.0.1.0.6 | [![dhongu](https:/dhongu.png?size=30px)](https:/dhongu) | Services Maintenance Plan | Free
[deltatech_sms](deltatech_sms/) | 14.0.1.0.0 | [![dhongu](https:/dhongu.png?size=30px)](https:/dhongu) | Send SMS to custom endpoint | Free
Expand Down
2 changes: 1 addition & 1 deletion deltatech_service_maintenance/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Deltatech Services Maintenance
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:e26d5afbef03c1bb6841674ebac0e6df65842401fb28c25f9cc8f88d8c7e3996
!! source digest: sha256:8eda8a92230bb956ec0a36b5ec6c7c384e060ce79b13a8f6658b0baffb6c1d15
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

.. |badge1| image:: https://img.shields.io/badge/maturity-Production%2FStable-green.png
Expand Down
2 changes: 1 addition & 1 deletion deltatech_service_maintenance/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
{
"name": "Deltatech Services Maintenance",
"summary": "Services Maintenance",
"version": "14.0.1.1.6",
"version": "14.0.1.1.7",
"author": "Terrabit, Dorin Hongu",
"website": "https://www.terrabit.ro",
"category": "Services/Maintenance",
Expand Down
3 changes: 2 additions & 1 deletion deltatech_service_maintenance/models/service_warranty.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ class ServiceWarranty(models.Model):
states={"done": [("readonly", True)]},
copy=True,
)
total_amount = fields.Float(string="Total amount", compute="_compute_total_amount")
total_amount = fields.Float(string="Total amount", compute="_compute_total_amount", store=True)

def _compute_service_agreement(self):
agreements_installed = (
Expand Down Expand Up @@ -80,6 +80,7 @@ def _compute_service_agreement(self):
else:
warranty.has_agreement = False

@api.depends("item_ids")
def _compute_total_amount(self):
for warranty in self:
total_amount = 0.0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -368,7 +368,7 @@ <h1 class="title">Deltatech Services Maintenance</h1>
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:e26d5afbef03c1bb6841674ebac0e6df65842401fb28c25f9cc8f88d8c7e3996
!! source digest: sha256:8eda8a92230bb956ec0a36b5ec6c7c384e060ce79b13a8f6658b0baffb6c1d15
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
<p><a class="reference external image-reference" href="https://odoo-community.org/page/development-status"><img alt="Production/Stable" src="https://img.shields.io/badge/maturity-Production%2FStable-green.png" /></a> <a class="reference external image-reference" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/licence-AGPL--3-blue.png" /></a> <a class="reference external image-reference" href="https:/dhongu/deltatech/tree/14.0/deltatech_service_maintenance"><img alt="dhongu/deltatech" src="https://img.shields.io/badge/github-dhongu%2Fdeltatech-lightgray.png?logo=github" /></a></p>
<dl class="docutils">
Expand Down
70 changes: 15 additions & 55 deletions deltatech_service_maintenance/views/service_warranty_view.xml
Original file line number Diff line number Diff line change
Expand Up @@ -126,10 +126,17 @@
<field name="picking_id" readonly="1" />
</group>
<group name="clarifications">
<field name="clarifications_state" />
<field
name="clarifications_state"
attrs="{'invisible': [('state','!=','approval_requested')]}"
/>
</group>
<group colspan="2">
<field name="description" widget="text" />
<field
name="description"
widget="text"
style="border: 2px solid red; font-weight:bold; padding: 2px;"
/>
</group>

</group>
Expand Down Expand Up @@ -195,59 +202,7 @@
</field>
</record>

<!-- <record id="view_service_notification_kanban" model="ir.ui.view">-->
<!-- <field name="name">notification</field>-->
<!-- <field name="model">service.notification</field>-->
<!-- <field name="arch" type="xml">-->

<!-- <kanban class="o_kanban_mobile" sample="1">-->
<!-- <field name="name" />-->
<!-- <field name="service_location_id" />-->
<!-- <field name="partner_id" />-->
<!-- <field name="state" />-->
<!-- <field name="date" />-->
<!-- <field name="activity_state" />-->
<!-- &lt;!&ndash; <progressbar field="activity_state"&ndash;&gt;-->
<!-- &lt;!&ndash; colors="{'planned': 'success', 'today': 'warning', 'overdue': 'danger'}" />&ndash;&gt;-->
<!-- <templates>-->
<!-- <t t-name="kanban-box">-->
<!-- <div t-attf-class="oe_kanban_card oe_kanban_global_click">-->
<!-- <div class="o_kanban_record_top mb16">-->
<!-- <div class="o_kanban_record_headings mt4">-->
<!-- <strong class="o_kanban_record_title">-->
<!-- <span>-->
<!-- <t t-esc="record.service_location_id.value" />-->
<!-- <t t-esc="record.partner_id.value" />-->
<!-- </span>-->
<!-- </strong>-->
<!-- </div>-->
<!-- </div>-->
<!-- <div class="o_kanban_record_bottom">-->
<!-- <div class="oe_kanban_bottom_left text-muted">-->
<!-- <span>-->
<!-- <t t-esc="record.name.value" />-->
<!-- <t t-esc="record.date.value and record.date.value.split(' ')[0] or False" />-->
<!-- </span>-->
<!-- <field name="activity_ids" widget="kanban_activity" />-->
<!-- </div>-->
<!-- <div class="oe_kanban_bottom_right">-->
<!-- <field-->
<!-- name="state"-->
<!-- widget="label_selection"-->
<!-- options="{'classes': {'new': 'default', 'progress': 'primary', 'assigned': 'success'}}"-->
<!-- />-->
<!-- </div>-->
<!-- </div>-->
<!-- </div>-->
<!-- </t>-->
<!-- </templates>-->
<!-- </kanban>-->


<!-- </field>-->
<!-- </record>-->

<!-- Search note -->
<!-- Search -->
<record id="view_service_warranty_filter" model="ir.ui.view">
<field name="name">service.warranty.search</field>
<field name="model">service.warranty</field>
Expand Down Expand Up @@ -280,6 +235,11 @@
<filter name="group_by_user_id" string="Responsible" context="{'group_by':'user_id'}" />
<filter name="group_by_state" string="State" context="{'group_by':'state'}" />
<filter name="group_by_equipment_id" string="Equipment" context="{'group_by':'equipment_id'}" />
<filter
name="group_by_clarifications"
string="Clarifications"
context="{'group_by':'clarifications_state'}"
/>
</group>
</search>
</field>
Expand Down
Loading