This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
BEGIN; | |
\set HELP_PID 49 | |
INSERT INTO helpdesk_stage (id,name,sequence,fold,create_uid,create_date,write_uid,write_date) select id,name,sequence,fold,create_uid,create_date,write_uid,write_date from project_task_type where id in (select type_id from project_task_type_rel where project_id in (:HELP_PID)); | |
--> insert team_id | |
insert into helpdesk_team(id,alias_id,message_last_post,name,company_id,sequence,color,create_uid,create_date,write_uid,write_date,assign_method) select :HELP_PID,31,p.message_last_post,a.name,a.company_id,p.sequence,p.color,p.create_uid,p.create_date,p.write_uid,p.write_date,'manual' from project_project as p inner join account_analytic_account as a ON a.id = p.analytic_account_id where p.id = :HELP_PID; | |
--> relation between teams and stages | |
insert into team_stage_rel (helpdesk_team_id,helpdesk_stage_id) select :HELP_PID,type_id from project_task_type_rel where project_id = :HELP_PID; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
players = self.env['res.partner'].search([ | |
('kicker_player', '=', True) | |
]).write({'ole_rating': 1500}) | |
matches = self.env['kicker.game'].search([]).sorted('create_date') | |
for match in matches: | |
match._update_ole_rating() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from OdooLocust.OdooLocust import OdooLocust | |
from locust import task, TaskSet, between | |
class PickerTaskSet(TaskSet): | |
"""Common code for picker task set""" | |
def _prepare_move_vals(self, product, qty, picking, location, location_dest): | |
product_product_model = self.client.get_model('product.product') | |
return { | |
'name': product_product_model.read(product)['name'], | |
'product_id': product, |