diff options
| -rw-r--r-- | indoteknik_custom/models/report_stock_forecasted.py | 7 | ||||
| -rw-r--r-- | indoteknik_custom/models/solr/product_template.py | 1 | ||||
| -rwxr-xr-x | indoteknik_custom/views/sale_order.xml | 2 |
3 files changed, 6 insertions, 4 deletions
diff --git a/indoteknik_custom/models/report_stock_forecasted.py b/indoteknik_custom/models/report_stock_forecasted.py index d5e48fdc..6058b7e5 100644 --- a/indoteknik_custom/models/report_stock_forecasted.py +++ b/indoteknik_custom/models/report_stock_forecasted.py @@ -10,9 +10,12 @@ class ReplenishmentReport(models.AbstractModel): for line in lines: document_out = line.get('document_out') + model_name = document_out._name - if document_out and "SO/" in document_out.name: + if document_out and model_name == 'sale.order': order_id = document_out.id + if document_out == False: + continue product_id = line.get('product', {}).get('id') query = [('product_id', '=', product_id)] @@ -32,7 +35,7 @@ class ReplenishmentReport(models.AbstractModel): 'qty_fullfillment': quantity, }) - return lines + return lines def _calculate_result(self, line): if line['document_in']: diff --git a/indoteknik_custom/models/solr/product_template.py b/indoteknik_custom/models/solr/product_template.py index b3787499..3d7d3a80 100644 --- a/indoteknik_custom/models/solr/product_template.py +++ b/indoteknik_custom/models/solr/product_template.py @@ -108,7 +108,6 @@ class ProductTemplate(models.Model): "max_discount" : voucher.max_discount_amount } }) - print(document) self.solr().add(docs=[document], softCommit=True) products = self.env['product.product'].search([ diff --git a/indoteknik_custom/views/sale_order.xml b/indoteknik_custom/views/sale_order.xml index ed82d28e..b8927a18 100755 --- a/indoteknik_custom/views/sale_order.xml +++ b/indoteknik_custom/views/sale_order.xml @@ -49,7 +49,7 @@ </field> <field name="user_id" position="after"> <field name="helper_by_id" readonly="1"/> - <field name="compute_fullfillment"/> + <field name="compute_fullfillment" invisible="1"/> </field> <field name="tag_ids" position="after"> <field name="eta_date" readonly="1"/> |
