Skip to content

Commit

Permalink
recondition state, picking
Browse files Browse the repository at this point in the history
  • Loading branch information
danila12 committed Feb 18, 2025
1 parent d4cc21b commit 2a74068
Show file tree
Hide file tree
Showing 8 changed files with 26 additions and 19 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ addon | version | maintainers | summary | price
[deltatech_service_consumable](deltatech_service_consumable/) | 16.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/) | 16.0.1.1.2 | [![dhongu](https://github.com/dhongu.png?size=30px)](https://github.com/dhongu) | Service Equipment Management | Free
[deltatech_service_equipment_base](deltatech_service_equipment_base/) | 16.0.1.1.4 | [![dhongu](https://github.com/dhongu.png?size=30px)](https://github.com/dhongu) | Service Equipment Management | Free
[deltatech_service_maintenance](deltatech_service_maintenance/) | 16.0.1.1.7 | [![dhongu](https://github.com/dhongu.png?size=30px)](https://github.com/dhongu) | Services Maintenance | Free
[deltatech_service_maintenance](deltatech_service_maintenance/) | 16.0.1.1.9 | [![dhongu](https://github.com/dhongu.png?size=30px)](https://github.com/dhongu) | Services Maintenance | Free
[deltatech_service_maintenance_agreement](deltatech_service_maintenance_agreement/) | 16.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/) | 16.0.1.0.6 | [![dhongu](https://github.com/dhongu.png?size=30px)](https://github.com/dhongu) | Services Maintenance Plan | Free
[deltatech_sms](deltatech_sms/) | 16.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:be45126e1a00417c195356b70f47c8ed3dab1f8d20229fe86b7d3e6e1c86f30f
!! source digest: sha256:410c5aa25faede98434ba59b4d0907681f80837f5fd1c5a22e8d1162670a6e95
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
.. |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": "16.0.1.1.7",
"version": "16.0.1.1.9",
"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"
)
7 changes: 5 additions & 2 deletions deltatech_service_maintenance/models/service_warranty.py
Original file line number Diff line number Diff line change
Expand Up @@ -151,9 +151,12 @@ def new_delivery_button(self):
if self.partner_id.parent_id:
if self.partner_id.parent_id.picking_warn == "block":
raise UserError(self.partner_id.parent_id.picking_warn_msg)

picking_type_id = False
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 @@ -14,7 +14,7 @@ <h1 class="title">Deltatech Services Maintenance</h1>
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:be45126e1a00417c195356b70f47c8ed3dab1f8d20229fe86b7d3e6e1c86f30f
!! source digest: sha256:410c5aa25faede98434ba59b4d0907681f80837f5fd1c5a22e8d1162670a6e95
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
<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="https://www.odoo.com/documentation/master/legal/licenses.html"><img alt="License: OPL-1" src="https://img.shields.io/badge/licence-OPL--1-blue.png" /></a> <a class="reference external image-reference" href="https://github.com/dhongu/deltatech/tree/16.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
16 changes: 3 additions & 13 deletions deltatech_service_maintenance/views/service_warranty_view.xml
Original file line number Diff line number Diff line change
Expand Up @@ -90,18 +90,8 @@
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'}" />

</header>
<sheet>
<div class="oe_title">
Expand Down Expand Up @@ -138,7 +128,7 @@
<field name="state" groups="deltatech_service_base.group_warranty_manager" />
</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 2a74068

Please sign in to comment.