Skip to content

Commit

Permalink
modif recondition states, picking
Browse files Browse the repository at this point in the history
  • Loading branch information
danila12 committed Feb 18, 2025
1 parent 8455b21 commit f2b1813
Show file tree
Hide file tree
Showing 8 changed files with 30 additions and 18 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ addon | version | maintainers | summary | price
[deltatech_service_consumable](deltatech_service_consumable/) | 14.0.1.1.3 | [![dhongu](https://github.com/dhongu.png?size=30px)](https://github.com/dhongu) | Service Consumable | Free
[deltatech_service_equipment](deltatech_service_equipment/) | 14.0.1.2.0 | [![dhongu](https://github.com/dhongu.png?size=30px)](https://github.com/dhongu) | Service Equipment Management | Free
[deltatech_service_equipment_base](deltatech_service_equipment_base/) | 14.0.1.1.3 | [![dhongu](https://github.com/dhongu.png?size=30px)](https://github.com/dhongu) | Service Equipment Management | Free
[deltatech_service_maintenance](deltatech_service_maintenance/) | 14.0.1.3.1 | [![dhongu](https://github.com/dhongu.png?size=30px)](https://github.com/dhongu) | Services Maintenance | Free
[deltatech_service_maintenance](deltatech_service_maintenance/) | 14.0.1.3.2 | [![dhongu](https://github.com/dhongu.png?size=30px)](https://github.com/dhongu) | Services Maintenance | Free
[deltatech_service_maintenance_agreement](deltatech_service_maintenance_agreement/) | 14.0.1.0.4 | [![dhongu](https://github.com/dhongu.png?size=30px)](https://github.com/dhongu) | Services Maintenance | Free
[deltatech_service_maintenance_plan](deltatech_service_maintenance_plan/) | 14.0.1.0.6 | [![dhongu](https://github.com/dhongu.png?size=30px)](https://github.com/dhongu) | Services Maintenance Plan | Free
[deltatech_sms](deltatech_sms/) | 14.0.1.0.0 | [![dhongu](https://github.com/dhongu.png?size=30px)](https://github.com/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:efebd97c6c43398af7c9c6f30013d94064ccd08d4cb8c5ea7e264b5c3c3de010
!! source digest: sha256:5b4013f29e39c251a436f414940a83f02619c9ac828d229d452fd8ab531cb8b2
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
.. |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.3.1",
"version": "14.0.1.3.2",
"author": "Terrabit, Dorin Hongu",
"website": "https://www.terrabit.ro",
"category": "Services/Maintenance",
Expand Down
3 changes: 3 additions & 0 deletions deltatech_service_maintenance/models/res_config_settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,6 @@ class ResConfigSettings(models.TransientModel):
picking_type_for_warranty = fields.Many2one(
"stock.picking.type", string="Warranty picking type", config_parameter="service.picking_type_for_warranty"
)
picking_type_for_recondition = fields.Many2one(
"stock.picking.type", string="Recondition picking type", config_parameter="service.picking_type_for_recondition"
)
5 changes: 4 additions & 1 deletion deltatech_service_maintenance/models/service_warranty.py
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,10 @@ def new_delivery_button(self):
raise UserError(self.partner_id.parent_id.picking_warn_msg)

get_param = self.env["ir.config_parameter"].sudo().get_param
picking_type_id = safe_eval(get_param("service.picking_type_for_warranty", "False"))
if self.type == "warranty":
picking_type_id = safe_eval(get_param("service.picking_type_for_warranty", "False"))
elif self.type == "recondition":
picking_type_id = safe_eval(get_param("service.picking_type_for_recondition", "False"))
if picking_type_id:
picking_type = self.env["stock.picking.type"].browse(picking_type_id)
else:
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:efebd97c6c43398af7c9c6f30013d94064ccd08d4cb8c5ea7e264b5c3c3de010
!! source digest: sha256:5b4013f29e39c251a436f414940a83f02619c9ac828d229d452fd8ab531cb8b2
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
<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://github.com/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
11 changes: 11 additions & 0 deletions deltatech_service_maintenance/views/res_config_view.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,17 @@
</div>
</div>
</div>
<div class="o_setting_right_pane">
<label for="picking_type_for_recondition" />
<div class="text-muted">
Picking type for reconditions transfers.
</div>
<div class="content-group">
<div class="mt16">
<field name="picking_type_for_recondition" class="o_light_label" widget="selection" />
</div>
</div>
</div>
</div>


Expand Down
21 changes: 8 additions & 13 deletions deltatech_service_maintenance/views/service_warranty_view.xml
Original file line number Diff line number Diff line change
Expand Up @@ -89,18 +89,13 @@
attrs="{'invisible': [('state','!=','approved')]}"
/>
<field name="type" invisible="1" />
<field
name="state"
widget="statusbar"
options="{'clickable': '1'}"
attrs="{'invisible': [('type','!=','warranty')]}"
/>
<field
name="rec_state"
widget="statusbar"
options="{'clickable': '1'}"
attrs="{'invisible': [('type','!=','recondition')]}"
/>
<field name="state" widget="statusbar" options="{'clickable': '1'}" />
<!-- <field-->
<!-- name="rec_state"-->
<!-- widget="statusbar"-->
<!-- options="{'clickable': '1'}"-->
<!-- attrs="{'invisible': [('type','!=','recondition')]}"-->
<!-- />-->
</header>
<sheet>
<div class="oe_title">
Expand Down Expand Up @@ -136,7 +131,7 @@
<field name="has_agreement" />
</group>
<group>
<field name="picking_id" readonly="1" attrs="{'invisible': [('type','!=','warranty')]}" />
<field name="picking_id" readonly="1" />
</group>
<group name="clarifications">
<field
Expand Down

0 comments on commit f2b1813

Please sign in to comment.