diff --git a/sos_inside_sales/__manifest__.py b/sos_inside_sales/__manifest__.py
index 5003d2f..87da682 100755
--- a/sos_inside_sales/__manifest__.py
+++ b/sos_inside_sales/__manifest__.py
@@ -15,6 +15,7 @@
'data': [
'security/ir.model.access.csv',
'security/record_rules.xml',
+ 'data/lead_source_data.xml',
'views/menu.xml',
'views/sos_inside_sales_leads_view.xml',
'views/sos_target_tracker_view.xml',
diff --git a/sos_inside_sales/data/lead_source_data.xml b/sos_inside_sales/data/lead_source_data.xml
new file mode 100644
index 0000000..40a43c7
--- /dev/null
+++ b/sos_inside_sales/data/lead_source_data.xml
@@ -0,0 +1,16 @@
+
+
+
+ Website
+
+
+ Expo
+
+
+ Cold Calls
+
+
+ Linkedin
+
+
+
diff --git a/sos_inside_sales/models/__pycache__/sos_inside_sales_leads.cpython-310.pyc b/sos_inside_sales/models/__pycache__/sos_inside_sales_leads.cpython-310.pyc
index 8a597fd..434cacd 100644
Binary files a/sos_inside_sales/models/__pycache__/sos_inside_sales_leads.cpython-310.pyc and b/sos_inside_sales/models/__pycache__/sos_inside_sales_leads.cpython-310.pyc differ
diff --git a/sos_inside_sales/models/sos_inside_sales_leads.py b/sos_inside_sales/models/sos_inside_sales_leads.py
index 96dd073..f73eb95 100755
--- a/sos_inside_sales/models/sos_inside_sales_leads.py
+++ b/sos_inside_sales/models/sos_inside_sales_leads.py
@@ -20,31 +20,44 @@ class sos_inside_sales_leads(models.Model):
moved_on = fields.Date(string="Moved On")
location = fields.Char(string="Location")
website_url = fields.Char(string="Website URL")
- vertical_domain = fields.Many2one('sos_vertical_domain',string="Domain / Industry", ondelete="cascade")
+ vertical_domain = fields.Many2many('sos_vertical_domain',string="Domain / Industry", ondelete="cascade")
line_ids_contacts = fields.One2many('sos_leads_contact_lines', 'ref_id', string="Contact Details",copy=True)
remarks=fields.Text(string="Remarks")
linkedin_profile = fields.Char(string="Linkedin profile")
- products = fields.Selection(
+ # products = fields.Selection(
+ # [
+ # ('BHMS 1.2V', 'BHMS 1.2V'),
+ # ('BHMS 2V', 'BHMS 2V'),
+ # ('BHMS 12V', 'BHMS 12V'),
+ # ('BMS-HV', 'BMS-HV'),
+ # ('BMS-LV 100A', 'BMS-LV 100A'),
+ # ('BMS-LV 40A', 'BMS-LV 40A'),
+ # ('SBMS 55A', 'SBMS 55A'),
+ # ('MC 250W', 'MC 250W'),
+ # ('HeartTarang', 'HeartTarang')
+ # ],
+ # string="Product Interested In")
+ products_interested = fields.Many2many('sos_products',string="Product Interested In")
+ service = fields.Selection(
[
- ('BHMS 1.2V', 'BHMS 1.2V'),
- ('BHMS 2V', 'BHMS 2V'),
- ('BHMS 12V', 'BHMS 12V'),
- ('BMS-HV', 'BMS-HV'),
- ('BMS-LV 100A', 'BMS-LV 100A'),
- ('BMS-LV 40A', 'BMS-LV 40A'),
- ('SBMS 55A', 'SBMS 55A'),
- ('MC 250W', 'MC 250W'),
- ('HeartTarang', 'HeartTarang')
+ ('Product', 'Products'),
+ ('Project', 'Projects')
+
],
- string="Product Interested In")
- source = fields.Selection(
+ string="Service Type",default="Product")
+ project_name= fields.Many2one('sos_projects',string="Project Name")
+ status = fields.Selection(
[
- ('website', 'Website'),
- ('expo', 'Expo'),
- ('cold_calls', 'Cold Calls'),
- ('linkedin', 'Linkedin')
+ ('Open', 'Open'),
+ ('Close', 'Close'),
+ ('New', 'New'),
+ ('In-Progress', 'In-Progress'),
+ ('Qualified', 'Qualified'),
+ ('Unqualified', 'Unqualified')
+
],
- string="Source")
+ string="Status",default="New")
+ new_source = fields.Many2one('lead_source', string="Source")
meeting_scheduled = fields.Selection(
[
('Online', 'Online'),
@@ -52,12 +65,24 @@ class sos_inside_sales_leads(models.Model):
],
string="Meeting Schedule")
expo_name = fields.Char(string="Expo Name")
- move_to_sales = fields.Many2many('res.users',string="Move Lead to")
- cc_mail = fields.Many2one('res.users',string="CC to")
+ move_to_sales = fields.Many2many('res.users',string="Move Lead to", domain=lambda self: [('groups_id', 'in', self.env.ref('sos_inventory.sos_sales_user').ids + self.env.ref('sos_inventory.sos_ce_head').ids)])
+ cc_mail = fields.Many2one('res.users',string="CC to", domain=lambda self: [('groups_id', 'in', self.env.ref('sos_inventory.sos_sales_user').ids + self.env.ref('sos_inventory.sos_ce_head').ids)])
move_div_display = fields.Boolean(default=False,string="Moved to Sales")
line_ids = fields.One2many('sos_inside_sales_activities_line', 'ref_id', string="Action")
week = fields.Char(string="Week")
reporting_to = fields.Many2one('res.users', string='Reporting To')
+ sales_type = fields.Selection(
+ [
+ ('Domestic', 'Domestic'),
+ ('International', 'International')
+ ],
+ string="Sales Type",default="Domestic")
+ country = fields.Many2one(
+ 'res.country',
+ string='Country',
+ default=lambda self: self.env['res.country'].search([('code', '=', 'IN')], limit=1)
+)
+
@api.model
def create(self, vals):
create_uid = vals.get('create_uid', self.env.uid)
@@ -122,14 +147,29 @@ class sos_inside_sales_leads(models.Model):
'transferred_on': fields.Date.today(),
'location':self.location,
'website_url':self.website_url,
- 'vertical_domain':self.vertical_domain.id,
+ 'vertical_domain': [(6, 0, self.vertical_domain.ids)],
'linkedin_profile':self.linkedin_profile,
- 'products':self.products,
+ 'products_interested':[(6, 0,self.products_interested.ids)],
'source':'inside_sales',
'expo_name':self.expo_name,
- 'lead_generated_by':self.env.user.id
+ 'lead_generated_by':self.env.user.id,
+ 'sales_type':self.sales_type,
+ 'interested_in':self.service,
+ 'project_name':self.project_name.id
})
if new_record:
+ if self.line_ids_contacts:
+ for contact in self.line_ids_contacts:
+ self.env['sos_leads_customer_contact_lines'].create({
+ 'ref_id': new_record.id,
+ 'name': contact.name,
+ 'dept': contact.dept,
+ 'email': contact.email,
+ 'mobile_number': contact.mobile_number,
+ 'set_as_primary': contact.set_as_primary,
+ 'linkedin_profile': contact.linkedin_profile,
+ 'remarks': contact.remarks
+ })
self.move_div_display = True
return {
'type': 'ir.actions.client',
@@ -151,6 +191,8 @@ class SOS_Leads_Line(models.Model):
email = fields.Char(string="Email Id")
mobile_number = fields.Char(string="Contact Number")
set_as_primary = fields.Boolean(string="Set Primary")
+ linkedin_profile = fields.Char(string="LinkedIn Profile")
+ remarks = fields.Text(string="Remarks")
@api.model
def create(self, vals):
record = super(SOS_Leads_Line, self).create(vals)
@@ -176,4 +218,11 @@ class sos_inside_sales_activities_lines(models.Model):
ref_id = fields.Many2one('sos_inside_sales_leads', ondelete="cascade")
action_date = fields.Date(string="Action Date")
- remarks = fields.Text(string="Remarks")
\ No newline at end of file
+ next_action_on = fields.Date(string="Next Action On")
+ remarks = fields.Text(string="Remarks")
+
+class LeadSource(models.Model):
+ _name = 'lead_source'
+ _description = 'Lead Source Master'
+
+ name = fields.Char(string="Source Name", required=True)
diff --git a/sos_inside_sales/security/ir.model.access.csv b/sos_inside_sales/security/ir.model.access.csv
index fbb50d2..bc0d9c7 100755
--- a/sos_inside_sales/security/ir.model.access.csv
+++ b/sos_inside_sales/security/ir.model.access.csv
@@ -4,3 +4,5 @@ access_sos_inside_sales_activities_line,sos_inside_sales_activities_line access,
access_sos_target_tracker,sos_target_tracker access,model_sos_target_tracker,base.group_user,1,1,1,1
access_sos_leads_contact_lines,sos_leads_contact_lines access,model_sos_leads_contact_lines,base.group_user,1,1,1,1
access_action_leads_report_wizard,action_leads_report_wizard access,model_action_leads_report_wizard,base.group_user,1,1,1,1
+access_lead_source,lead_source access,model_lead_source,base.group_user,1,1,1,1
+
diff --git a/sos_inside_sales/views/sos_inside_sales_leads_view.xml b/sos_inside_sales/views/sos_inside_sales_leads_view.xml
index d97ee31..04c6dc6 100755
--- a/sos_inside_sales/views/sos_inside_sales_leads_view.xml
+++ b/sos_inside_sales/views/sos_inside_sales_leads_view.xml
@@ -7,10 +7,12 @@
+
-
+
+
-
+
@@ -20,17 +22,21 @@
sos_inside_sales_leads
-
-
-
+
+
-
+
+
-
+
+
+
@@ -50,18 +56,24 @@
+
-
-
+
+
+
+
-
-
-
-
+
+
+
+
+
@@ -77,6 +89,8 @@
+
+
@@ -87,6 +101,8 @@
+
+
diff --git a/sos_inventory/models/__pycache__/sos_fir.cpython-310.pyc b/sos_inventory/models/__pycache__/sos_fir.cpython-310.pyc
index 2962655..26b6fed 100644
Binary files a/sos_inventory/models/__pycache__/sos_fir.cpython-310.pyc and b/sos_inventory/models/__pycache__/sos_fir.cpython-310.pyc differ
diff --git a/sos_inventory/models/__pycache__/sos_inventory_customers.cpython-310.pyc b/sos_inventory/models/__pycache__/sos_inventory_customers.cpython-310.pyc
index 5aa533a..2d548e4 100644
Binary files a/sos_inventory/models/__pycache__/sos_inventory_customers.cpython-310.pyc and b/sos_inventory/models/__pycache__/sos_inventory_customers.cpython-310.pyc differ
diff --git a/sos_inventory/models/__pycache__/sos_ir.cpython-310.pyc b/sos_inventory/models/__pycache__/sos_ir.cpython-310.pyc
index fffd990..58cde96 100644
Binary files a/sos_inventory/models/__pycache__/sos_ir.cpython-310.pyc and b/sos_inventory/models/__pycache__/sos_ir.cpython-310.pyc differ
diff --git a/sos_inventory/models/__pycache__/sos_material.cpython-310.pyc b/sos_inventory/models/__pycache__/sos_material.cpython-310.pyc
index 3db2d01..7d33736 100644
Binary files a/sos_inventory/models/__pycache__/sos_material.cpython-310.pyc and b/sos_inventory/models/__pycache__/sos_material.cpython-310.pyc differ
diff --git a/sos_inventory/models/__pycache__/sos_mon.cpython-310.pyc b/sos_inventory/models/__pycache__/sos_mon.cpython-310.pyc
index b5c6dc0..e58ea79 100644
Binary files a/sos_inventory/models/__pycache__/sos_mon.cpython-310.pyc and b/sos_inventory/models/__pycache__/sos_mon.cpython-310.pyc differ
diff --git a/sos_inventory/models/__pycache__/sos_mrn.cpython-310.pyc b/sos_inventory/models/__pycache__/sos_mrn.cpython-310.pyc
index e6baf1d..50a8b9d 100644
Binary files a/sos_inventory/models/__pycache__/sos_mrn.cpython-310.pyc and b/sos_inventory/models/__pycache__/sos_mrn.cpython-310.pyc differ
diff --git a/sos_inventory/models/__pycache__/sos_ncmr.cpython-310.pyc b/sos_inventory/models/__pycache__/sos_ncmr.cpython-310.pyc
index 7584bd5..c60edb0 100644
Binary files a/sos_inventory/models/__pycache__/sos_ncmr.cpython-310.pyc and b/sos_inventory/models/__pycache__/sos_ncmr.cpython-310.pyc differ
diff --git a/sos_inventory/models/__pycache__/sos_testing_parameters.cpython-310.pyc b/sos_inventory/models/__pycache__/sos_testing_parameters.cpython-310.pyc
index d812147..38da000 100644
Binary files a/sos_inventory/models/__pycache__/sos_testing_parameters.cpython-310.pyc and b/sos_inventory/models/__pycache__/sos_testing_parameters.cpython-310.pyc differ
diff --git a/sos_inventory/models/sos_fir.py b/sos_inventory/models/sos_fir.py
index a3daf2b..e2302b6 100755
--- a/sos_inventory/models/sos_fir.py
+++ b/sos_inventory/models/sos_fir.py
@@ -63,6 +63,9 @@ class FIR_Only(models.Model):
cloud_data = fields.Binary("Cloud Data", required=False, attachment=True)
cloud_data_filename = fields.Char("Cloud Data Filename")
+
+ firmware_data = fields.Binary("Firmware Data", required=False, attachment=True)
+ firmware_data_filename = fields.Char("Firmware Data Filename")
@api.onchange('batch_size')
def _onchange_batch_size(self):
if self._origin and self.batch_size is not False:
@@ -75,11 +78,11 @@ class FIR_Only(models.Model):
]
self.testing_parameter_line_ids = line_values
- @api.constrains('test_log_filename', 'sd_card_data_filename', 'cloud_data_filename')
+ @api.constrains('test_log_filename', 'sd_card_data_filename', 'cloud_data_filename', 'firmware_data_filename')
def _check_file_extension(self):
allowed_extensions = ['xlsx', 'xls', 'csv', 'zip', 'pdf']
for record in self:
- for field_name in ['test_log_filename', 'sd_card_data_filename', 'cloud_data_filename']:
+ for field_name in ['test_log_filename', 'sd_card_data_filename', 'cloud_data_filename','firmware_data_filename']:
file_name = getattr(record, field_name)
if file_name:
ext = file_name.split('.')[-1].lower()
diff --git a/sos_inventory/models/sos_inventory_customers.py b/sos_inventory/models/sos_inventory_customers.py
index 30814c4..b9c0615 100755
--- a/sos_inventory/models/sos_inventory_customers.py
+++ b/sos_inventory/models/sos_inventory_customers.py
@@ -13,3 +13,23 @@ class sos_inventory_customers(models.Model):
customer_name = fields.Char(string="Customer Name")
customer_location = fields.Char(string="Location")
+ @api.model
+ def create(self, vals):
+ new_name = (vals.get('customer_name') or '').lower()
+
+ if new_name and len(new_name) >= 5:
+ existing_customers = self.search([])
+
+ for customer in existing_customers:
+ existing_name = (customer.customer_name or '').lower()
+
+ # Check all substrings of length 5 or more
+ for i in range(len(new_name) - 4):
+ substring = new_name[i:i+5]
+ if substring in existing_name:
+ raise UserError(
+ f"A customer with a similar name already exists: '{customer.customer_name}' "
+ f"(matched substring: '{substring}')"
+ )
+
+ return super(sos_inventory_customers, self).create(vals)
\ No newline at end of file
diff --git a/sos_inventory/models/sos_ir.py b/sos_inventory/models/sos_ir.py
index 9b3f22c..005e1aa 100755
--- a/sos_inventory/models/sos_ir.py
+++ b/sos_inventory/models/sos_ir.py
@@ -154,7 +154,7 @@ class SOS_IR(models.Model):
self.line_ids_material = lines
except Exception as e:
- _logger.error("Error processing po_no: %s", str(e))
+ print("Error processing po_no: %s", str(e))
@api.onchange('wo_no')
def _onchange_wo_no(self):
if self.wo_no:
@@ -170,7 +170,7 @@ class SOS_IR(models.Model):
self.line_ids_sfg = lines
except Exception as e:
- _logger.error("Error processing po_no: %s", str(e))
+ print("Error processing po_no: %s", str(e))
@api.onchange('wo_no_inhouse')
def _onchange_wo_no_inhouse(self):
if self.wo_no_inhouse:
@@ -186,7 +186,7 @@ class SOS_IR(models.Model):
self.line_ids_sfg = lines
except Exception as e:
- _logger.error("Error processing po_no: %s", str(e))
+ print("Error processing po_no: %s", str(e))
def action_report_ir_btn(self):
@@ -409,6 +409,7 @@ class SOS_IR_Line_Material(models.Model):
unit_price = fields.Monetary(string="Unit Price", currency_field='currency_id')
test_report = fields.Binary(string="Test Report")
test_report_filename=fields.Char(string="Test Report File Name")
+ expiry_date = fields.Date(string="Expiry Date")
@api.onchange('component_id')
def _onchange_component_id(self):
if self.component_id:
diff --git a/sos_inventory/models/sos_material.py b/sos_inventory/models/sos_material.py
index 9ea2156..732b187 100755
--- a/sos_inventory/models/sos_material.py
+++ b/sos_inventory/models/sos_material.py
@@ -48,6 +48,8 @@ class SOS_Material(models.Model):
string="Materials History - In",
domain=[('action', '=', 'in')]
)
+
+ shelf_life = fields.Selection([('yes', 'Yes'), ('no', 'No')],default="no", string="Shelf Life",required=True)
line_ids_out = fields.One2many(
'sos_material_transaction_history', 'ref_id',
diff --git a/sos_inventory/models/sos_mon.py b/sos_inventory/models/sos_mon.py
index 8b30f09..29e8f49 100755
--- a/sos_inventory/models/sos_mon.py
+++ b/sos_inventory/models/sos_mon.py
@@ -14,7 +14,7 @@ class sos__mon(models.Model):
mon_date = fields.Date(string="MON/SON/FON Date", required=True, default=fields.Date.today)
min_no = fields.Many2one('sos_min',string="MIN/SIN/FIN No")
filled_by = fields.Many2one('res.users', string='Filled By', readonly=True,required=True,default=lambda self: self.env.user)
- logged_inuser_group=fields.Boolean(string='Group Name',compute='compute_user_grp')
+ logged_inuser_group=fields.Boolean(string='Group Name',compute='compute_user_grp',store=True)
dept = fields.Many2one('sos_departments',string="Department")
purpose = fields.Char(string="Purpose")
product_name = fields.Many2one('sos_fg', string='Material/Product Name & No')
@@ -61,7 +61,7 @@ class sos__mon(models.Model):
auto_load_fg_item_ids = fields.Many2many(
'sos_fg',
compute='_compute_fg_items',
- store=False
+ store=True
)
company_id = fields.Many2one('res.company', store=True, copy=False,
string="Company",
@@ -70,7 +70,7 @@ class sos__mon(models.Model):
related='company_id.currency_id',
default=lambda
self: self.env.user.company_id.currency_id.id)
- approx_value = fields.Monetary(compute='_compute_approx_value', string="Approximate Value", currency_field='currency_id', readonly=True)
+ approx_value = fields.Monetary(compute='_compute_approx_value', string="Approximate Value", currency_field='currency_id', readonly=True,store=True)
status = fields.Selection([ ('open', 'Open'),('close', 'Closed')], default='open' , string="Status")
active = fields.Boolean(default=True)
@api.constrains('indent_ref_no', 'auto_load_fg_items')
@@ -189,6 +189,8 @@ class sos__mon(models.Model):
@api.onchange('auto_load_fg_items')
def _onchange_auto_load_fg_items(self):
+ if not self.auto_load_fg_items:
+ return
if self.auto_load_fg_items:
self.material_option = True
self.sfg_option = True
diff --git a/sos_inventory/models/sos_mrn.py b/sos_inventory/models/sos_mrn.py
index e4835bf..756d2b2 100755
--- a/sos_inventory/models/sos_mrn.py
+++ b/sos_inventory/models/sos_mrn.py
@@ -46,7 +46,51 @@ class sos__mrn(models.Model):
default=lambda
self: self.env.user.company_id.currency_id.id)
approx_value = fields.Monetary(compute='_compute_approx_value', string="Approximate Value", currency_field='currency_id', readonly=True)
-
+ @api.onchange('min_no')
+ def _onchange_min_no(self):
+ if self.min_no:
+ self.material_option = self.min_no.material_option
+ self.sfg_option = self.min_no.sfg_option
+ self.fg_option = self.min_no.fg_option
+ #materials
+ self.line_ids_material = [(5, 0, 0)]
+ material_lines = []
+ for material in self.min_no.line_ids_material:
+ line_vals = {
+ 'mrn_id': self.id,
+ 'component_id': material.component_id,
+ 'qp_no': material.qp_no,
+ 'uom': material.uom,
+ 'quantity': material.quantity
+ }
+ material_lines.append((0, 0, line_vals))
+
+ self.line_ids_material = material_lines
+ #sfg
+ self.line_ids_sfg = [(5, 0, 0)]
+ sfg_lines = []
+ for sfg in self.min_no.line_ids_sfg:
+ line_vals_sfg = {
+ 'mrn_id': self.id,
+ 'component_id': sfg.component_id,
+ 'qp_no': sfg.qp_no,
+ 'quantity': sfg.quantity
+ }
+ sfg_lines.append((0, 0, line_vals_sfg))
+
+ self.line_ids_sfg = sfg_lines
+ #sfg
+ self.line_ids_fg = [(5, 0, 0)]
+ fg_lines = []
+ for fg in self.min_no.line_ids_fg:
+ line_vals_fg = {
+ 'mrn_id': self.id,
+ 'component_id': fg.component_id,
+ 'quantity': fg.quantity
+ }
+ fg_lines.append((0, 0, line_vals_fg))
+
+ self.line_ids_fg = fg_lines
@api.depends('line_ids_material.total_cost')
def _compute_approx_value(self):
for record in self:
@@ -115,6 +159,7 @@ class sos__mrn(models.Model):
def action_report_esign_btn1(self):
sequence_util = self.env['sos_common_scripts']
splitted=self.order_type.split(",")
+ customer_return_record = False
if self.return_type == "customer":
sequence_util = self.env['sos_common_scripts']
tc_no = sequence_util.generate_sequence('sos_transfer_challan_return_from_customer','TC', 'tc_no')
diff --git a/sos_inventory/models/sos_ncmr.py b/sos_inventory/models/sos_ncmr.py
index 791c9e1..45aff0e 100755
--- a/sos_inventory/models/sos_ncmr.py
+++ b/sos_inventory/models/sos_ncmr.py
@@ -56,6 +56,7 @@ class NCMR_Model(models.Model):
comments_on_capa = fields.Html(string="Comments on Corrective / Preventive Action ")
qa_comments=fields.Text(string="QA Comments")
qa_done_on = fields.Date(string="Verified On")
+ rework_responsible_rd_user = fields.Many2one('res.users',string='R&D User')
rd_user = fields.Many2many('res.users',string='R&D User', relation='sos_ncmr_rd_user_rel')
qa_by = fields.Many2one('res.users',string='QC In-Charge',readonly=True)
qa_sign = fields.Image(related="qa_by.signature_image",string='QC In-Charge',readonly=True)
@@ -94,10 +95,15 @@ class NCMR_Model(models.Model):
string="Rework Action",
default="inhouse"
)
+ rework_action_by_qc = fields.Boolean(string="Rework")
rd_comments=fields.Text(string="Comments")
rd_approval_by = fields.Many2one('res.users',string='R&D In-Charge',readonly=True)
rd_approval_sign = fields.Image(related="rd_approval_by.signature_image",string='R&D In-Charge',readonly=True)
rd_approval_on = fields.Datetime(string="Approved On")
+ rework_rd_approval_by = fields.Many2one('res.users',string='Rework - R&D In-Charge',readonly=True)
+ rework_rd_approval_sign = fields.Image(related="rework_rd_approval_by.signature_image",string='Rework - R&D In-Charge',readonly=True)
+ rework_rd_approval_on = fields.Datetime(string="Approved On")
+
combined_incoming_doc_ref = fields.Reference(
selection=[
('sos_iqi', 'IQI Ref No'),
@@ -244,7 +250,8 @@ class NCMR_Model(models.Model):
open_count = sum(1 for rec in line.defective_status_ids if rec.status == 'open')
closed_count = sum(1 for rec in line.defective_status_ids if rec.status == 'closed')
- closure_rate = ((closed_count/required_ncmr)*100)
+ closure_rate = (closed_count / required_ncmr) * 100 if required_ncmr else 0.0
+
ppm = None
@@ -668,6 +675,13 @@ class NCMR_Model(models.Model):
'rd_approval_by',
'rd_approval_on'
)
+ def action_rework_rd_esign_btn(self):
+ send_email = self.env['sos_common_scripts']
+ send_email.action_assign_signature(
+ self,
+ 'rework_rd_approval_by',
+ 'rework_rd_approval_on'
+ )
def action_qa_esign_btn(self):
if self.action_group:
@@ -678,6 +692,20 @@ class NCMR_Model(models.Model):
'qa_tested_on',
'sos_inventory.sos_qc_user'
)
+ if self.rework_action_by_qc:
+ # Email part
+ body_html = f"""
+
Below NCMR is waiting for your Action
+ """
+ send_email = self.env['sos_common_scripts']
+ send_email.send_direct_email(
+ self.env,
+ "sos_ncmr",
+ self.id,
+ self.rework_responsible_rd_user.login,
+ "NCMR Rework Action Request",
+ body_html
+ )
if self.action_group == "rd":
# Email part
body_html = f"""
diff --git a/sos_inventory/models/sos_testing_parameters.py b/sos_inventory/models/sos_testing_parameters.py
index 49cdd8d..02b002e 100755
--- a/sos_inventory/models/sos_testing_parameters.py
+++ b/sos_inventory/models/sos_testing_parameters.py
@@ -6,7 +6,7 @@ class SosTestingParameters(models.Model):
_rec_name='fg_name'
fg_name = fields.Many2one('sos_fg',string="FG Name")
- parameter_ids = fields.One2many('sos_parameter', 'testing_id', string= 'BRR Testing Parameters',copy=True)
+ parameter_ids = fields.One2many('sos_parameter', 'testing_id', string= 'In-Process/BRR Testing Parameters',copy=True)
fir_parameter_ids = fields.One2many('sos_parameter_fir', 'testing_id', string= 'FIR Testing Parameters',copy=True)
specification_ids = fields.One2many('sos_specification', 'spec_id', string='Specifications',copy=True)
deliverables_ids = fields.One2many('sos_deliverables', 'accessory_id', string='Deliverables',copy=True)
diff --git a/sos_inventory/security/record_rules.xml b/sos_inventory/security/record_rules.xml
index c7da269..6dce93d 100755
--- a/sos_inventory/security/record_rules.xml
+++ b/sos_inventory/security/record_rules.xml
@@ -44,11 +44,10 @@
-
-
+
Sos NCMR: All Records - Read Access
- [('rd_user', '=', user.id)]
+ [('rd_user', '=', user.id), ('rework_responsible_rd_user', '=', user.id)]
diff --git a/sos_inventory/views/sos_fir_brr_view.xml b/sos_inventory/views/sos_fir_brr_view.xml
index 41ddf85..bd55538 100755
--- a/sos_inventory/views/sos_fir_brr_view.xml
+++ b/sos_inventory/views/sos_fir_brr_view.xml
@@ -192,7 +192,7 @@
-
+
diff --git a/sos_inventory/views/sos_fir_view.xml b/sos_inventory/views/sos_fir_view.xml
index d03c9af..f31eb38 100755
--- a/sos_inventory/views/sos_fir_view.xml
+++ b/sos_inventory/views/sos_fir_view.xml
@@ -119,6 +119,12 @@
+
+
+
+
+
+
diff --git a/sos_inventory/views/sos_ir_view.xml b/sos_inventory/views/sos_ir_view.xml
index 42fdaa9..dd9cc2b 100755
--- a/sos_inventory/views/sos_ir_view.xml
+++ b/sos_inventory/views/sos_ir_view.xml
@@ -99,6 +99,7 @@
+
diff --git a/sos_inventory/views/sos_material_view.xml b/sos_inventory/views/sos_material_view.xml
index 3dc4aab..9f112f6 100755
--- a/sos_inventory/views/sos_material_view.xml
+++ b/sos_inventory/views/sos_material_view.xml
@@ -118,6 +118,7 @@
+
diff --git a/sos_inventory/views/sos_ncmr_view.xml b/sos_inventory/views/sos_ncmr_view.xml
index b6d330f..98e63b0 100755
--- a/sos_inventory/views/sos_ncmr_view.xml
+++ b/sos_inventory/views/sos_ncmr_view.xml
@@ -29,7 +29,7 @@
-
+
@@ -242,19 +242,27 @@
-
-
-
+
+
+
| QC Comments |
|
+
| Action to be taken By |
|
+
+ | Rework Decision |
+
+
+
+ |
+
| QC Tested By |
@@ -270,8 +278,8 @@
| |
-
-
+
+
| Comments |
@@ -301,8 +309,8 @@
-
-
+
+
| Comments |
@@ -323,9 +331,9 @@
|
-
+
-
+
| Comments |
@@ -362,8 +370,8 @@
-
-
+
+
| Comments |
@@ -383,7 +391,27 @@
Approved By |
|
-
+
+
+
+
+ | Approved By |
+
+
+ |
+
+
+ | Approved On |
+ |
+
+
+ | Approved By |
+ |
+
+
+
+
+
diff --git a/sos_inventory/views/sos_testing_parameters_view.xml b/sos_inventory/views/sos_testing_parameters_view.xml
index bd1b8cf..a77b0d7 100755
--- a/sos_inventory/views/sos_testing_parameters_view.xml
+++ b/sos_inventory/views/sos_testing_parameters_view.xml
@@ -38,7 +38,7 @@
-
+
@@ -115,7 +115,7 @@
- FG Configurations
+ In-Process Configurations
sos_testing_parameters
tree,form
@@ -136,7 +136,7 @@
-
- | Yet to Bill |
-
-
-
- |
-
-
+
+ | Yet to Bill |
+
+
+
+
+
+
+
+
+ |
+
+
+
+ 0.00 |
+
+
+
+ |
+ |
+
+
+
+
- |
- |
-
| Collected |
- |
+ |
|
@@ -186,22 +199,25 @@
|
- | Yet to Bill |
- |
- |
- |
- |
- |
- |
- |
- |
- |
- |
- |
- |
- |
- |
-
+ Yet to Bill |
+
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+
+ |
+ |
+
+
| Collected |
|
diff --git a/sos_sales/security/ir.model.access.csv b/sos_sales/security/ir.model.access.csv
index 0f4ffdb..e8bf7b4 100755
--- a/sos_sales/security/ir.model.access.csv
+++ b/sos_sales/security/ir.model.access.csv
@@ -61,5 +61,7 @@ access_sos_sales_achievement_report_brief_wizard,sos_sales_achievement_report_br
access_sos_billing_collection,sos_billing_collection access,model_sos_billing_collection,base.group_user,1,1,1,1
access_sos_billed_collection_wizard,sos_billed_collection_wizard access,model_sos_billed_collection_wizard,base.group_user,1,1,1,1
access_sos_business_performance_wizard,sos_business_performance_wizard access,model_sos_business_performance_wizard,base.group_user,1,1,1,1
+access_sos_products,sos_products access,model_sos_products,base.group_user,1,1,1,1
+access_sos_projects,sos_projects access,model_sos_projects,base.group_user,1,1,1,1
diff --git a/sos_sales/views/sos_sales_achievement_report_view.xml b/sos_sales/views/sos_sales_achievement_report_view.xml
index c558761..fe3e009 100755
--- a/sos_sales/views/sos_sales_achievement_report_view.xml
+++ b/sos_sales/views/sos_sales_achievement_report_view.xml
@@ -13,13 +13,23 @@ name="action_report_achievement_btn"> Print Report
Sales Achievements Report
-
-
-
-
-
-
+
+
+
+
+
+
diff --git a/sos_sales/views/sos_sales_leads_view.xml b/sos_sales/views/sos_sales_leads_view.xml
index f607b39..33dea9c 100755
--- a/sos_sales/views/sos_sales_leads_view.xml
+++ b/sos_sales/views/sos_sales_leads_view.xml
@@ -22,11 +22,11 @@
sos_sales_leads
-
-
-
+
-
+
+
+
@@ -53,20 +53,25 @@
+
+
+
-
-
+
+
-
+
@@ -82,6 +87,8 @@
+
+
diff --git a/sos_sales/wizard/__pycache__/action_plan_summary_wizard.cpython-310.pyc b/sos_sales/wizard/__pycache__/action_plan_summary_wizard.cpython-310.pyc
index c2c5d97..677a066 100755
Binary files a/sos_sales/wizard/__pycache__/action_plan_summary_wizard.cpython-310.pyc and b/sos_sales/wizard/__pycache__/action_plan_summary_wizard.cpython-310.pyc differ
diff --git a/sos_sales/wizard/sos_sales_achievement_wizard_view.xml b/sos_sales/wizard/sos_sales_achievement_wizard_view.xml
index a66042f..60a83d3 100644
--- a/sos_sales/wizard/sos_sales_achievement_wizard_view.xml
+++ b/sos_sales/wizard/sos_sales_achievement_wizard_view.xml
@@ -1,5 +1,29 @@
+
+ sos.sales.achievement.report.brief.form
+ sos_sales_achievement_report_brief
+
+
+
+
sos_sales_achievement_report_brief_wizard.form
@@ -19,13 +43,18 @@
+
+
+
-
+
+
@@ -139,6 +168,8 @@
+