Skip to content

Commit

Permalink
Merge branch '16.0' of https://github.com/OmniaGit/odooplm.git into HEAD
Browse files Browse the repository at this point in the history
  • Loading branch information
mboscolo committed Nov 6, 2024
2 parents 85ae0af + 2e5135f commit 8c303a9
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 7 deletions.
2 changes: 1 addition & 1 deletion plm/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
##############################################################################
{
"name": "Product Lifecycle Management",
"version": "16.0.28",
"version": "16.0.29",
"author": "OmniaSolutions",
"website": "https://odooplm.omniasolutions.website",
"category": "Manufacturing/Product Lifecycle Management (PLM)",
Expand Down
5 changes: 3 additions & 2 deletions plm/models/plm_mixin.py
Original file line number Diff line number Diff line change
Expand Up @@ -416,8 +416,9 @@ def write(self, vals):
return super(RevisionBaseMixin, self).write(vals)

def create(self, vals):
if 'engineering_code' in vals and vals['engineering_code'] not in [False, '-','']:
vals['engineering_code_editable']=False
for record_val in vals:
if 'engineering_code' in record_val and record_val['engineering_code'] not in [False, '-','']:
record_val['engineering_code_editable']=False
return super(RevisionBaseMixin, self).create(vals)

def get_display_notification(self, message):
Expand Down
2 changes: 1 addition & 1 deletion plm_auto_engcode/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
##############################################################################
{
"name": "PLM Automatic Engineering Code",
"version": "16.0.1",
"version": "16.0.2",
"author": "OmniaSolutions",
"website": "https://odooplm.omniasolutions.website",
"category": "Manufacturing/Product Lifecycle Management (PLM)",
Expand Down
2 changes: 1 addition & 1 deletion plm_auto_engcode/models/product_product.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ class pProductProduct(models.Model):

@api.onchange("categ_id")
def onchange_categ_id(self):
if self.engineering_code_editable:
if self.product_tmpl_id.engineering_code_editable:
self.product_tmpl_id.engineering_code = self.product_tmpl_id._getNewCode()

class ProductTemplate(models.Model):
Expand Down
2 changes: 0 additions & 2 deletions plm_client_customprocedure/models/res_groups.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,14 +108,12 @@ def commonSave(self, vals, binary_field, content_field, fname, custom_file):

def getCustomProcedure(self):
for groupBrws in self:
logging.info('Request CustomProcedure file for user %r and group %r-%r and id %r' % (groupBrws.env.uid, groupBrws.category_id.name, groupBrws.name, groupBrws.id))
if groupBrws.custom_procedure:
return True, groupBrws.custom_procedure, groupBrws.custom_procedure_fname
return False, '', groupBrws.custom_procedure_fname

def getCustomMulticad(self):
for groupBrws in self:
logging.info('Request Multicad file for user %r and group %r-%r and id %r' % (groupBrws.env.uid, groupBrws.category_id.name, groupBrws.name, groupBrws.id))
if groupBrws.custom_multicad:
return True, groupBrws.custom_multicad, groupBrws.custom_multicad_fname
return False, '', groupBrws.custom_multicad_fname

0 comments on commit 8c303a9

Please sign in to comment.