Hello, Francisco On Thu, 7 Sep 2023 17:08:52 -0300 Francisco Maria Moyano Casco <moyanocasco.francis...@gmail.com> wrote:
> Hi, > I am using GH version 4.2 and I found the next issue every time I > want to make a stock movement on nursing patient round. > 'A value is required for field "Cost Price" in "Stock Move".' > > This is because the code includes the unit price and not the cost > price on create_stock_moves method on the PatientRounding class in the > health_stock module. Thanks for reporting. The unit price is needed. That is not the issue. Is not a really problem of the nursing package. The issue was introduced by Tryton here: https://hg.tryton.org/modules/stock/rev/694a0303831f It's related to the storage location type. It applies in these scenarios: from_type != 'storage' and to_type == 'storage' from_type == 'storage' and to_type != 'storage' from_type != 'drop' and to_type == 'drop' from_type == 'drop' and to_type != 'drop' Under these scenarios, we need to add the cost price as an argument. So, depending on the type of location, the issue may or may not apply. For example, creating the stock moves from the prescription does not generate the problem. We'll review the current and upcoming contexts where we do stock moves (prescriptions, vaccination, nursing, and upcoming stock moves in surgeries) and see the best way to pick/choose the locations to match the current Tryton stock functionality. More soon :) Bests Luis