mirror of
https://github.com/NaN-tic/trytond-patches.git
synced 2023-12-14 06:03:03 +01:00
Merge branch '6.0' into 067076
This commit is contained in:
commit
4ac27c3584
23
issue11913.diff
Normal file
23
issue11913.diff
Normal file
|
@ -0,0 +1,23 @@
|
|||
diff --git a/trytond/trytond/worker.py b/trytond/trytond/worker.py
|
||||
index d9777c53..b1ed119c 100644
|
||||
--- a/trytond/trytond/worker.py
|
||||
+++ b/trytond/trytond/worker.py
|
||||
@@ -62,15 +62,15 @@ def work(options):
|
||||
queues = [Queue(name, mpool) for name in options.database_names]
|
||||
|
||||
tasks = TaskList()
|
||||
- timeout = options.timeout
|
||||
try:
|
||||
while True:
|
||||
+ timeout = options.timeout
|
||||
while len(tasks.filter()) >= processes:
|
||||
time.sleep(0.1)
|
||||
for queue in queues:
|
||||
task_id, next_ = queue.pull(options.name)
|
||||
- timeout = min(
|
||||
- next_ or options.timeout, timeout, options.timeout)
|
||||
+ if next_ is not None:
|
||||
+ timeout = min(next_, timeout)
|
||||
if task_id:
|
||||
tasks.append(queue.run(task_id))
|
||||
break
|
46
remove_left_right_project_work.diff
Normal file
46
remove_left_right_project_work.diff
Normal file
|
@ -0,0 +1,46 @@
|
|||
index bcd08af..b3c4d46 100644
|
||||
--- a/trytond/trytond/modules/project/work.py
|
||||
+++ b/trytond/trytond/modules/project/work.py
|
||||
@@ -188,13 +188,11 @@ class Work(sequence_ordered(), tree(separator='\\'), ModelSQL, ModelView):
|
||||
'get_total')
|
||||
comment = fields.Text('Comment')
|
||||
parent = fields.Many2One('project.work', 'Parent',
|
||||
- left='left', right='right', ondelete='RESTRICT',
|
||||
+ ondelete='RESTRICT',
|
||||
domain=[
|
||||
('company', '=', Eval('company', -1)),
|
||||
],
|
||||
depends=['company'])
|
||||
- left = fields.Integer('Left', required=True, select=True)
|
||||
- right = fields.Integer('Right', required=True, select=True)
|
||||
children = fields.One2Many('project.work', 'parent', 'Children',
|
||||
domain=[
|
||||
('company', '=', Eval('company', -1)),
|
||||
@@ -219,14 +217,6 @@ class Work(sequence_ordered(), tree(separator='\\'), ModelSQL, ModelView):
|
||||
WorkStatus = pool.get('project.work.status')
|
||||
return WorkStatus.get_default_status(cls.default_type())
|
||||
|
||||
- @classmethod
|
||||
- def default_left(cls):
|
||||
- return 0
|
||||
-
|
||||
- @classmethod
|
||||
- def default_right(cls):
|
||||
- return 0
|
||||
-
|
||||
@classmethod
|
||||
def __register__(cls, module_name):
|
||||
TimesheetWork = Pool().get('timesheet.work')
|
||||
@@ -310,6 +300,12 @@ class Work(sequence_ordered(), tree(separator='\\'), ModelSQL, ModelView):
|
||||
# Migration from 5.4: replace state by status
|
||||
table_project_work.not_null_action('state', action='remove')
|
||||
|
||||
+ if table_project_work.column_exist('left'):
|
||||
+ table_project_work.drop_column('left')
|
||||
+
|
||||
+ if table_project_work.column_exist('right'):
|
||||
+ table_project_work.drop_column('right')
|
||||
+
|
||||
@fields.depends('type', 'status')
|
||||
def on_change_type(self):
|
||||
pool = Pool()
|
24
sao_issue11810.diff
Normal file
24
sao_issue11810.diff
Normal file
|
@ -0,0 +1,24 @@
|
|||
diff --git a/sao/src/common.js b/sao/src/common.js
|
||||
index f1354013..16d263d1 100644
|
||||
--- a/sao/src/common.js
|
||||
+++ b/sao/src/common.js
|
||||
@@ -1183,17 +1183,8 @@
|
||||
if (~['many2one', 'one2one', 'one2many', 'many2many']
|
||||
.indexOf(field.type)) {
|
||||
var test = function(value) {
|
||||
- if (field.type == 'many2one') {
|
||||
- if ((typeof value != 'string') &&
|
||||
- (value !== null)) {
|
||||
- return false;
|
||||
- }
|
||||
- } else {
|
||||
- if (typeof value != 'string') {
|
||||
- return false;
|
||||
- }
|
||||
- }
|
||||
- return true;
|
||||
+ return ((typeof value == 'string') ||
|
||||
+ (value === null));
|
||||
};
|
||||
if (value instanceof Array) {
|
||||
return value.every(test);
|
7
series
7
series
|
@ -37,6 +37,7 @@ account_asset_update_asset.diff # [account_asset] decimals when updata asset #04
|
|||
sao_colors.diff # [sao] Use the same colors as 5.4 version
|
||||
sao_remove_email.diff # [sao] Removes the email button from the toolbar
|
||||
issue11526.diff # [sao] Form scroll with o2m with lots of columns
|
||||
sao_issue11810.diff # [sao] Make domain with None value for xxx2Many fields stringable
|
||||
|
||||
commission_menu_group.diff # [commission] Creates ir.ui.menu-res.group record for commission menu and group
|
||||
|
||||
|
@ -67,4 +68,10 @@ issue11750.diff # [stock] 'create' method execution frozen or extremly slow
|
|||
|
||||
allow_none_list_price.diff # [sale_price_list] allow set none as price list in a sale with tax_included=True product_price_list
|
||||
|
||||
issue11913.diff # [trytond] Too fast worker loop
|
||||
|
||||
remove_left_right_project_work.diff # [project] Remove parent left and parent right for the project.work module.
|
||||
|
||||
stock_shipment.diff # [stock] No try to copy None moves when set transit location
|
||||
|
||||
issue11229.diff # [sale_credit] Sale with payments should not be blocked by credit limit
|
||||
|
|
13
stock_shipment.diff
Normal file
13
stock_shipment.diff
Normal file
|
@ -0,0 +1,13 @@
|
|||
diff --git a/shipment.py b/shipment.py
|
||||
index 9067c31..6c64390 100644
|
||||
--- a/trytond/trytond/modules/stock/shipment.py
|
||||
+++ b/trytond/trytond/modules/stock/shipment.py
|
||||
@@ -2476,6 +2476,8 @@ class ShipmentInternal(ShipmentAssignMixin, Workflow, ModelSQL, ModelView):
|
||||
if m.state != 'done'
|
||||
and m.from_location != shipment.transit_location
|
||||
and m.to_location != shipment.transit_location]
|
||||
+ if not moves:
|
||||
+ continue
|
||||
Move.copy(moves, default={
|
||||
'to_location': shipment.transit_location.id,
|
||||
'planned_date': shipment.planned_start_date,
|
Loading…
Reference in a new issue