Skip to content

Commit

Permalink
Merge pull request #84 from Bahmni/BAH-3663
Browse files Browse the repository at this point in the history
BAH-3663 | Add. Disable active product filtering during drug creation
  • Loading branch information
Hari Prasath A authored Mar 12, 2024
2 parents 5679cc5 + 704f966 commit eb4d78b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion bahmni_api_feed/models/drug_data_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,8 @@ def _fill_drug_category(self, drug_categ_from_feed, parent_id=None):
@api.model
def create_or_update_drug(self, vals):
'''Method for creating/updating a new product under drug category'''
products = self.env['product.product'].search([('uuid', '=', vals.get("uuid"))])
products = self.env['product.product'].with_context({"active_test": False}).\
search([('uuid', '=', vals.get("uuid"))])
updated_drug = self._fill_drug_object(vals, products.ids)
if products:
product = self.env['product.product'].browse(products.ids[0:1])
Expand Down

0 comments on commit eb4d78b

Please sign in to comment.