Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

False "Row 1: Conversion Factor is mandatory" message #31758

Closed
ChipwizBen opened this issue Aug 2, 2022 · 10 comments
Closed

False "Row 1: Conversion Factor is mandatory" message #31758

ChipwizBen opened this issue Aug 2, 2022 · 10 comments

Comments

@ChipwizBen
Copy link

Information about bug

When trying to save a Sales Invoice, erpnext complains that there is no conversion factor set. There is:

image

I have tried clearing this field, setting it to 0, 1, 1.0, and various other things but it refuses to proceed.

This occurs with new invoices, previously saved invoices, and duplicates of previously submitted invoices. A lot of (previously working) auto-repeat invoices failed to create too on 31/07, so the issue seems to be internal rather than browser based.

Module

accounts

Version

ERPNext: v13.36.2 (version-13)
Frappe Framework: v13.36.3 (version-13)

Installation method

manual install

Relevant log output / Stack trace / Full Error Message.

No logs appear in /home/erp/frappe-bench/logs/ when pressing submit and the error appears. The earlier logs all seem unrelated, e.g.:

15:36:05 default: frappe.utils.background_jobs.execute_job(event=None, is_async=True, job_name='frappe.core.doctype.scheduled_job_type.scheduled_job_type.run_scheduled_jo..., kwargs={'job_type': 'frappe.email.queue.flush'}, method='frappe.core.doctype.scheduled_job_type.scheduled_job_type.run_scheduled_jo..., site='erp', user='Administrator') (d8c90808-ea0b-43fd-aa8d-16af3c55ac5f)
15:36:05 default: Job OK (d8c90808-ea0b-43fd-aa8d-16af3c55ac5f)
15:36:05 Result is kept for 500 seconds
@ChipwizBen ChipwizBen added the bug label Aug 2, 2022
@ChipwizBen
Copy link
Author

Have some related logs from the auto creation failure, which failed for the same reason:

Traceback (most recent call last): File "apps/frappe/frappe/automation/doctype/auto_repeat/auto_repeat.py", line 184, in create_documents new_doc = self.make_new_document() File "apps/frappe/frappe/automation/doctype/auto_repeat/auto_repeat.py", line 199, in make_new_document new_doc.insert(ignore_permissions=True) File "apps/frappe/frappe/model/document.py", line 261, in insert self.run_before_save_methods() File "apps/frappe/frappe/model/document.py", line 1052, in run_before_save_methods self.run_method("validate") File "apps/frappe/frappe/model/document.py", line 941, in run_method out = Document.hook(fn)(self, *args, **kwargs) File "apps/frappe/frappe/model/document.py", line 1259, in composer return composed(self, method, *args, **kwargs) File "apps/frappe/frappe/model/document.py", line 1241, in runner add_to_return_value(self, fn(self, *args, **kwargs)) File "apps/frappe/frappe/model/document.py", line 938, in fn return method_object(*args, **kwargs) File "apps/erpnext/erpnext/accounts/doctype/sales_invoice/sales_invoice.py", line 96, in validate super(SalesInvoice, self).validate() File "apps/erpnext/erpnext/controllers/selling_controller.py", line 36, in validate self.set_qty_as_per_stock_uom() File "apps/erpnext/erpnext/controllers/selling_controller.py", line 200, in set_qty_as_per_stock_uom frappe.throw(_("Row {0}: Conversion Factor is mandatory").format(d.idx)) File "apps/frappe/frappe/__init__.py", line 504, in throw msgprint( File "apps/frappe/frappe/__init__.py", line 479, in msgprint _raise_exception() File "apps/frappe/frappe/__init__.py", line 434, in _raise_exception raise raise_exception(msg) frappe.exceptions.ValidationError: Row 1: Conversion Factor is mandatory

@ChipwizBen ChipwizBen changed the title False "Row X: Conversion Factor is mandatory" message False "Row 1: Conversion Factor is mandatory" message Aug 2, 2022
@dj12djdjs
Copy link
Collaborator

@ChipwizBen I'm unable to reproduce this issue. Could you please attach a GIF or some extra steps to reproduce your error.

factor

@dj12djdjs dj12djdjs added stock can't-reproduce We are unable to reproduce this bug, provide more information. labels Aug 2, 2022
@ChipwizBen
Copy link
Author

simplescreenrecorder-2022-08-03_10.45.27.mp4

@dj12djdjs dj12djdjs added valid and removed can't-reproduce We are unable to reproduce this bug, provide more information. labels Aug 3, 2022
@dj12djdjs
Copy link
Collaborator

@ChipwizBen If you don't need any conversion factor, if you make the Stock UOM and the UOM value the same. In your example it should be Nos, and Nos instead of Nos, and Unit. You won't receive this error.

@ChipwizBen
Copy link
Author

ChipwizBen commented Aug 3, 2022

@dj12djdjs Thanks for your help, this did allow me to save, however I don't have any stock items entered as it's a consultancy company and we don't have any "stock" as such. We sell consultancy hours and data, and the rates for these vary between each system and customer. We rely heavily on auto-repeated invoices rather than prescribed stock values.

I chose "Nos" as an example but in reality we're using a combo of Units / Gigabytes / Hours / Months and a few others.

Is there a way that we can have the Stock UOM made the same as the UOM? I can't edit the Stock UOM which implies that I'll have to create a stock item for every single line item on every single invoice. It has worked the way we've been doing it for years and it broke during an update.

And, frustratingly, "You cannot unset 'Read Only' for field Stock UOM" :-(

@ChipwizBen
Copy link
Author

Is this likely to be fixed any time soon? Or is there a way that I can introduce a workaround? Just trying to consider my options.

@rtdany10
Copy link
Contributor

rtdany10 commented Aug 6, 2022

which implies that I'll have to create a stock item for every single line item on every single invoice

You can create non-stock(service) items in ERPNext.
You just have to untick the Maintain Stock checkbox when you create them.

I think that would be a better solution for you as you'll be able to generate item-wise reports as well.

@hameedacpa
Copy link

I have the same issue

@hameedacpa
Copy link

I tried to replicate the error and I found that the issue coming when user relies on the item name when entering it in the invoice
The user should rely on Item code when selecting the item, not the item name
2022-09-02_15-38-32
I think this field named "Item" should be clear for the user by changing the name to "Item Code" and it should be mandatory

@s-aga-r s-aga-r added accounts and removed stock labels Sep 13, 2022
@nabinhait nabinhait self-assigned this Sep 15, 2022
@deepeshgarg007
Copy link
Member

Potential Fix: #32714

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 25, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

8 participants