The line has been modified, your changes will be discarded issue in odoo 9 - odoo

The products list is dynamically generated while running purchase request. While change the cost or qty it shows the following error, What need to do to modify the record?

Finally I fond the answer for it. I made one of the required field(UOM) in order line. So that only this happens.

Related

Bigcommerce: edit an existing order shipment address

I imported 10k legacy orders with the wrong state. How do I fix it? When I use the order shipment update endpoint PUT /orders/{order_id}/shipments/{id} I get an error that the shipping_address field is not writable. What do I do?
I'm using the API docs here: https://developer.bigcommerce.com/api-reference/orders/orders-api/order-shipments/putordersorderidshipmentsid
It isn't possible to directly write to the order shipment address state field, but for context, that mirrors the behavior you'd see when working with order shipments in the control panel. The best solution would be to delete the shipments with the incorrect state and re-create the shipments.
Edit:
There are 2 options to re-create the shipment with the correct address: The first is to update the order by adding a new shipping address containing the correct state and use that shipping address when you re-make the shipment. Although existing order shipping addresses can't be edited, the order shipping address array is additive. So you can update the order by adding a new shipping address and use that order_address_id to create the new shipment. The second option would be to delete the entire order with the incorrect shipping address and re-import it with the correct data, then re-create the shipment.
On the orders resource, we are scoping a feature request to make shipping addresses editable. (This would align with what you're able to do when editing an order through the control panel). I'll keep you posted in this thread when there's an update on that, although the best solution in the meantime would be to use one of the options outlined above.

CHANGEDOCUMENT_READ_HEADERS Why can't I read the creator of an entry?

I started using CHANGEDOCUMENT_READ_HEADERS today and I need to find the creator of an entry. I've noticed that when there are no changes after the creation there will occur an error.
So if you just created an entry and try to get its changes via CHANGEDOCUMENT_READ_HEADERS, you'll get the NO_POSITION_FOUND exception. Apperantly, the creation of an entry, although it is visible in the changelog, does not count as a change.
Does anybody know a FM which allows me to find the creator of an entry?
Thanks!
The CHANGEDOCUMENT_READ_HEADERS function module searches the change documents on the table CDHDR and CDPOS, if no changes were made on the document (Purchase order, FI document, etc.) no change document will be created.
To get the creator of an entry, you will need to get it directly from the table that stores the information or BAPI for that document.
For exemple:
The purchase order creator can be found on the table EKKO (Purchasing Document Header) field ERNAM (Created by).

Automate sale order to invoice creation in odoo

Is there an easy way to automate the sale order process ?
I have customer whose salesman will create Sale orders for every sim he creates.
Once Sale order is closed both DC and Invoice should be created and validated automatically, there is no need for stock picking/packing concepts.
Could someone have any idea on doing it without affecting the default flow ?
Or should I call every function related to that process in my module ?
I tried calling the functions in stock picking and then tried validating DC. I got the odoo Warning as
'You have a difference between quantity on the operation and the quantities specified for the lots'
Could you please suggest me which particular function picks the product from stock in stock.picking ?
Hi Nirmalraj Rethinasabapathi,
Yes, I think I have done it for my project.
I can map What I have done to achieve that:
Added two boolean fields in Warehouse form.
One for "Auto Validate Invoice" and another one is for "Automation In Delivery"
Override sales confirmation button action and bypass all the function you want.
It is working perfectly for me.

Prestashop - Product default combination doesn't want to save

I'm relatively new with working with Prestashop and I cannot fix one problem.
After deleting one combination for a product new default combination doesn't want to save and therefore the price showing on the website is not correct.
Any ideas how to fix it?
Thanks!
It might be possible that the combination that you have deleted is a default combination, you can try the following steps to set another default combination.
Open table ps_product_attribute and filter the rows with product ID of the product you want to edit. You will see a column default_on in this table, just edit it to 1 for the combination you want to set as default.
Experienced exactly the same problem (Prestashop 1.6.23) - the default product combination did not want to save.
In debug mode received an error stating the "default_on" field was already set for this product.
Solved it by opening the database table "ps_product_attribute" and searched via the product ID. Deleted the old combinations manually (which were not displayed at the back-end anymore and not in use). Then I was able to set the default combination again.
Sidenote: in our Prestashop setup (with a custom theme) the price was showing as 0 EUR (front-end) before getting the default combination to save again.

Integrity error where try to save a supplier invoices

I build a module who increase stock on supplier invoices. Work fine on devel server but when I pun on work server I have this error. How can I corret this error?
Integrity Error
The operation cannot be completed, probably due to the following: - deletion: you may be trying to delete a record while other records still reference it - creation/update: a mandatory field is not correctly set
[object with reference: Purchase Order Line - purchase.order.line]
Integrity Error on OpenERP occur because of two possibility (mentioned on the description of error):
When you create or update a record, a mandatory field is not correctly set or is not filled. What field? One of field in your object (mentioned). In your case: purchase.order.line.
When you delete a record, the record you want to delete is used by another record and set as a mandatory field (required) from the python code.
My guess, if you get the error when you create/update a record (Purchase Order), maybe you create/update the order lines, but one of mandatory field in order lines is empty.