Blahout Posted August 11, 2016 Share Posted August 11, 2016 Hello there, I've just quick question. When I'm trying to change oldest orders state to canceled I get that error: [PrestaShopException]Property Order->module is not validat line 909 in file classes/ObjectModel.php 904. }905.906. $message = $this->validateField($field, $this->$field);907. if ($message !== true) {908. if ($die) {909. throw new PrestaShopException($message);910. }911. return $error_return ? $message : false;912. }913. }914. ObjectModelCore->validateFields - [line 246 - classes/ObjectModel.php] ObjectModelCore->getFields - [line 304 - classes/order/Order.php] OrderCore->getFields - [line 652 - classes/ObjectModel.php] ObjectModelCore->update - [line 306 - classes/order/OrderHistory.php] OrderHistoryCore->changeIdOrderState - [line 531 - controllers/admin/AdminOrdersController.php] - [3 Arguments] AdminOrdersControllerCore->postProcess - [line 178 - classes/controller/Controller.php] ControllerCore->run - [line 367 - classes/Dispatcher.php] DispatcherCore->dispatch - [line 58 - admin/index.php] Please, could you be so kind and help me? I run Presta on 1.6.1.4 Link to comment Share on other sites More sharing options...
Icodia Posted January 11, 2017 Share Posted January 11, 2017 Hi, I have got the same issue with a 1.6.1.10 version. Can you tell me about your unusual modules installed ? Maybe one of them is breaking the process ? Regards. Link to comment Share on other sites More sharing options...
LadyLionheart Posted January 29, 2017 Share Posted January 29, 2017 I have the same problem... Link to comment Share on other sites More sharing options...
tmzwinkels Posted February 1, 2017 Share Posted February 1, 2017 Which solution do you use ? private function changeOrderState($order) { $order_state = new OrderState(6); $history = new OrderHistory(); $history->id_order = $order->id; $history->id_employee = (int) $this->context->employee->id; $use_existings_payment = false; if (!$order->hasInvoice()) { $use_existings_payment = true; } $history->changeIdOrderState((int) $order_state->id, $order, $use_existings_payment); } $order->setCurrentState(Configuration::get('PS_OS_CANCELED'), $this->context->employee->id); Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now