Add patch for multicompany cron

This commit is contained in:
Sergi Almacellas Abellana 2015-11-23 12:38:49 +01:00
parent 28e083174e
commit 84d15941e3
2 changed files with 14 additions and 0 deletions

13
multicompany_cron.diff Normal file
View file

@ -0,0 +1,13 @@
diff -r 7658cd8c2e7f cron.py
--- a/trytond/trytond/modules/company/cron.py Fri Oct 02 08:56:51 2015 +0200
+++ b/trytond/trytond/modules/company/cron.py Mon Nov 23 12:35:33 2015 +0100
@@ -23,7 +23,8 @@
for company in cron.companies:
User.write([cron.user], {
'company': company.id,
- 'main_company': company.id,
+ 'main_company': (company.parent.id if company.parent
+ else company.id),
})
with Transaction().set_context(company=company.id):
super(Cron, cls)._callback(cron)

1
series
View file

@ -82,3 +82,4 @@ issue18801002_1.diff
#stock_lot_improve_sync_inventory_to_outgoing.diff
#stock_lot_fix_pick_product_without_outgoing_moves.diff
#purchase_fix_get_move_done_rounding.diff
#multicompany_cron.diff