How to genrate pos receipt number in sequence order in odoo - odoo-15

Currently i'm trying genrate pos Receipt Number in squence like Order-0001, Order-0002 but after close session then open new session squence start with Order-0001. Please help me.

Related

Odoo create stock.move.line

when i try to create stock move line in transfer with automation with the following code, error pop up saying "psycopg2.errors.InFailedSqlTransaction: current transaction is aborted, commands ignored until end of transaction block".
The code:
result=[]
result.append(
{'company_id':record.partner_id.id,
'date':record.date,
'location_dest_id':5,
'location_id':8 ,
'product_uom_qty':1,
'product_uom_id':32,
'product_id':465
})
env['stock.move.line'].create(result)
May I ask any idea what is the problem with my code or how can i programmtically create stock move line. Thanks
You set the company_id to the partner_id which may not be present in res.company table and
if it happens you should see the following error message:
DETAIL: Key (company_id)=(...) is not present in table "res_company".
This will prevent Odoo from creating a stock move line, try to set the company_id to self.env.user.company_id.id
Note that since v12 Odoo supports passing a list of values to create function

Cannot create unbalanced journal entry in Odoo

I am using odoo version 12.0+e . Whenever I go to POS and Close a Session by Hitting the "validate closing & post entries" button it shows loading screen and after a few minutes it shows "Cannot create unbalanced journal entry." error. I am running odoo trial in cloud server. the problem screenshot has been tagged.enter image description here
Instead of creating separate jounral entry line you have to setup vals for debit and credit line then create jounral entry record. This will solve your problem
Show this

Some errors while changing default currency in odoo 10.0...

How to change the default currency in Odoo 10.0 without exchange rate ?
I tried the method from http://www.surekhatech.com/blog/change-currency-in-pos-in-odoo-10
But I got the errors such as
When in POS, I tried to "Validate Closing & Post Entries", I got Odoo warning There is no account defined on the journal Cash for Profit involved in a cash difference and can not post the POS transaction.
While in POS checkout, the unsolved problems on https://www.odoo.com/forum/help-1/question/10-0-a-transaction-can-t-have-a-0-amount-none-error-on-validate-odoo-pos-payment-121554
How to fix them ?
I also includeed the recorded screen on youtube at : https://youtu.be/IahubLwnDDE
In solution of your 1st error you need to define opening and closing account in payment methods define in POS front. For that POS >> Configuraion >> Payment Methods. In that choose payment method which active in POS and from that there are 2 fields name "Default Debit Account" and "Default Credit Account" define accounts here. By adding accounts here your 1st error is resolved. Don't know much about second error if you know then late me know. :)

Load Runner Session ID Changes Indefinitely

Good day
I'm trying to perform load testing with LoadRunner 11. Here's an issue:
I've got automatically generated script after actions recording
Need to catch Session ID. I do it with web_reg_save_param() in the next way:
web_reg_save_param("S_ID",
"LB=Set-Cookie: JSESSIONID=",
"RB=; Path=/app/;",
LAST);
web_add_cookie("S_ID; DOMAIN={host}");
I catch ID from the response (Tree View):
D2B6F5B05A1366C395F8E86D8212F324
Compare it with Replay Log and see:
"S_ID = 75C78912AE78D26BDBDE73EBD9ADB510".
Compare 2 IDs above with the next request ID and see 3rd ID (Tree View):
80FE367101229FA34EB6429F4822E595
Why do I have 3 different IDs?
Let me know if I have to provide extra information.
You should Use(Search=All) below Code. Provided your Right and left boundary is correct:
web_reg_save_param("S_ID",
"LB=Set-Cookie: JSESSIONID=",
"RB=; Path=/app/;",
"Search=All",
LAST);
web_add_cookie("{S_ID}; DOMAIN={host}");
For Details refer HP Mannual for web_reg_save_param function.
I do not see what the conflict or controversy is here. Yes, items related to state or session will definitely change from user to user, one recording session to the next. They may even change from one request to the next. You may need to record several times to identify the change and use pattern for when you need to collect and when you need to reuse the collected data from a response in a subsequent request.
Take a listen to this podcast. It should help
http://www.perfbytes.com/dynamic-data-correlation

MB_CREATE_GOODS_MOVEMENT returns subrc = 5 when running BAPI_GOODSMVT_CREATE

Using me21n to do a returns purchase order (credit) we are getting a pretty uninformative error text in the return table when creating a MIGO entry. This is an enhanced step on the user exit. BAPI_GOODSMVT_CREATE returns;
1, E, WRF_CONS, 010, No data available, , 000000, , , , , GOODSMVT_ITEM, 1, , RPECLNT500
I have attempted to debug further as 'No data available' doesn't mean a whole lot to me. I noticed MB_CREATE_GOODS_MOVEMENT returned a subrc of 5 in the EMKPF structure. Not sure if i have gone off on a tangent here or not... Its pretty darned heavy going in there.
Anyway the create MIGO step is only giving the above return error for a particular vendor code. When we use the exact same data with the exception of Vendor code and Info Record (which populates automatically via the vendor selection) the MIGO step is successful. Any suggestions?
Thanks for the help
Ok this is resolved. We had to add partner LF into Site A302 for Vendor profile. Then add the STO details in SPRO. Huzar for config....