Browse Source

Dec 7 : [FIX] Bug Fixed 'mobile_service_shop'

pull/313/head
AjmalCybro 2 years ago
parent
commit
8812d8cd15
  1. 1
      mobile_service_shop/__manifest__.py
  2. 3
      mobile_service_shop/data/mobile_service_data.xml
  3. 2
      mobile_service_shop/data/mobile_service_email_template.xml
  4. 5
      mobile_service_shop/doc/RELEASE_NOTES.md
  5. 12
      mobile_service_shop/models/mobile_service.py
  6. 4
      mobile_service_shop/models/product_template.py
  7. 2
      mobile_service_shop/models/service_ticket.py
  8. 4
      mobile_service_shop/reports/mobile_service_email_template.xml
  9. 2
      mobile_service_shop/static/description/index.html
  10. 4
      mobile_service_shop/views/mobile_service_views.xml

1
mobile_service_shop/__manifest__.py

@ -39,6 +39,7 @@
'views/brand_models_views.xml',
'views/mobile_brand_views.xml',
'wizard/mobile_create_invoice_views.xml',
'reports/mobile_service_email_template.xml',
'reports/mobile_service_ticket.xml',
'data/mobile_service_data.xml',
'data/mobile_service_email_template.xml'],

3
mobile_service_shop/data/mobile_service_data.xml

@ -19,5 +19,4 @@
<field name="type">service</field>
</record>
</data>
</odoo>
</odoo>

2
mobile_service_shop/data/mobile_service_email_template.xml

@ -18,4 +18,4 @@
</field>
</record>
</data>
</odoo>
</odoo>

5
mobile_service_shop/doc/RELEASE_NOTES.md

@ -4,3 +4,8 @@
#### Version 17.0.1.0.0
#### ADD
Initial Commit for Mobile Service Management
### 24.11.2023
#### Version 17.0.1.0.1
#### UPDT
Bug fix

12
mobile_service_shop/models/mobile_service.py

@ -26,6 +26,7 @@ import pytz
class MobileService(models.Model):
"""Creates the model mobile.service"""
_name = 'mobile.service'
_rec_name = 'name'
_description = "Mobile Service"
@ -135,12 +136,13 @@ class MobileService(models.Model):
string="Picking Id",
help='Stock picking ID information.')
picking_transfer_id = fields.Many2one('stock.picking.type',
'Deliver To',
string='Deliver To',
required=True,
default=_default_picking_transfer,
help="This will determine picking "
"type of outgoing shipment.")
picking_count = fields.Integer()
picking_count = fields.Integer(string="Picking Count",
help='Number of outgoing shipment')
@api.onchange('return_date')
def check_date(self):
@ -283,7 +285,8 @@ class MobileService(models.Model):
self.picking_count = len(picking)
moves = order.filtered(
lambda r: r.product_id.type in ['product',
'consu'])._create_stock_moves_transfer(picking)
'consu'])._create_stock_moves_transfer(
picking)
move_ids = moves._action_confirm()
move_ids._action_assign()
if order.product_uom_qty < order.qty_stock_move:
@ -359,5 +362,4 @@ class MobileService(models.Model):
'complaint_description': description_text,
'mobile_brand': self.brand_name.brand_name,
'model_name': self.model_name.mobile_brand_models}
return (self.env.ref('mobile_service_shop.mobile_service_ticket').
report_action(self, data=data))
return self.env.ref('mobile_service_shop.mobile_service_ticket').report_action(self, data=data)

4
mobile_service_shop/models/product_template.py

@ -23,14 +23,12 @@ from odoo import fields, models
class ProductTemplate(models.Model):
# Inherited to add custom fields
"""Inherits the model product.template to extend and add fields"""
_inherit = 'product.template'
is_a_parts = fields.Boolean(
'Is a Mobile Part', default=False,
help="Specify if the product is a mobile part or not.")
brand_name = fields.Many2one('mobile.brand', string="Brand",
help="Select a mobile brand for the part.")
model_name = fields.Many2one('brand.model', string="Model Name",

2
mobile_service_shop/models/service_ticket.py

@ -27,7 +27,7 @@ class MobileServiceTicket(models.AbstractModel):
_name = 'report.mobile_service_shop.mobile_service_ticket_template'
@api.model
def _get_report_values(self, data):
def _get_report_values(self, docids, data):
"""Returns the data file for the report"""
terms = self.env['terms.conditions'].search([])
return {

4
mobile_service_shop/reports/mobile_service_email_template.xml

@ -10,8 +10,8 @@
<h3><strong>Service Ticket</strong></h3>
</div>
<div class="col-xs-6" style="margin-top:2%; margin-left:15%;">
<table style="width:100%;">
<tbody style="line-height:2">
<table style="width:100%;border: none;">
<tbody>
<tr>
<td><strong>Ref no</strong></td><td>&#160;:&#160;</td>
<td><strong>&#160;<span style="font-size:16px; font-weight:2px;" t-esc="sev_id"/></strong></td>

2
mobile_service_shop/static/description/index.html

@ -1,4 +1,4 @@
<!DOCTYPE html>
<!DOCTYPE html>
<html lang="en">
<head>

4
mobile_service_shop/views/mobile_service_views.xml

@ -264,7 +264,7 @@
</field>
</record>
<!--Mobile service model menus-->
<menuitem id="mobile_service_shop_menu_root" web_icon="mobile_service_shop,static/description/web-icon.png"
<menuitem id="mobile_service_shop_menu_root" web_icon="mobile_service_shop,static/description/icon.png"
name="Mobile Service" sequence="20"/>
<menuitem id="mobile_service_shop_menu" parent="mobile_service_shop_menu_root" sequence="20"/>
<menuitem action="mobile_service_action_request" id="mobile_service_menu_request"
@ -273,4 +273,4 @@
<menuitem id="mobile_service_menu_configuration" parent="mobile_service_shop_menu_root"
name="Configuration" sequence="3"/>
</data>
</odoo>
</odoo>

Loading…
Cancel
Save