diff --git a/issue10464.diff b/issue10464.diff deleted file mode 100644 index 7317582..0000000 --- a/issue10464.diff +++ /dev/null @@ -1,19 +0,0 @@ -diff --git a/tests/test_currency.py b/tests/test_currency.py -index bec4c1d..b4f8699 100644 ---- a/trytond/trytond/modules/currency/tests/test_currency.py -+++ b/trytond/trytond/modules/currency/tests/test_currency.py -@@ -382,9 +382,9 @@ def suite(): - tearDown=doctest_teardown, encoding='utf-8', - checker=doctest_checker, - optionflags=doctest.REPORT_ONLY_FIRST_FAILURE)) -- suite.addTests(doctest.DocFileSuite( -- 'scenario_currency_rate_update.rst', -- tearDown=doctest_teardown, encoding='utf-8', -- checker=doctest_checker, -- optionflags=doctest.REPORT_ONLY_FIRST_FAILURE)) -+ #suite.addTests(doctest.DocFileSuite( -+ # 'scenario_currency_rate_update.rst', -+ # tearDown=doctest_teardown, encoding='utf-8', -+ # checker=doctest_checker, -+ # optionflags=doctest.REPORT_ONLY_FIRST_FAILURE)) - return suite diff --git a/issue8618.diff b/issue8618.diff index d7f3d57..29e20f2 100644 --- a/issue8618.diff +++ b/issue8618.diff @@ -1,20 +1,20 @@ diff -r 6597f33e51d2 invoice.py --- a/trytond/trytond/modules/account_invoice/invoice.py Fri Aug 09 16:33:39 2019 +0200 +++ b/trytond/trytond/modules/account_invoice/invoice.py Wed Aug 28 23:44:50 2019 +0200 -@@ -2267,7 +2267,7 @@ - else: - self.account = tax.credit_note_account +@@ -2657,7 +2657,7 @@ class InvoiceTax(sequence_ordered(), ModelSQL, ModelView): + self.account = self.tax.credit_note_account -- @fields.depends('tax', 'base', 'amount', 'manual', 'invoice', -+ @fields.depends('tax', 'base', 'manual', 'invoice', - '_parent_invoice.currency') - def on_change_with_amount(self): - Tax = Pool().get('account.tax') -@@ -2281,7 +2281,6 @@ - if self.invoice.currency: - amount = self.invoice.currency.round(amount) - return amount + @fields.depends( +- 'tax', 'base', 'amount', 'manual', 'invoice', ++ 'tax', 'base', 'manual', 'invoice', + '_parent_invoice.currency', + # From_date + '_parent_invoice.accounting_date', '_parent_invoice.invoice_date', +@@ -2677,7 +2677,6 @@ class InvoiceTax(sequence_ordered(), ModelSQL, ModelView): + if self.invoice.currency: + amount = self.invoice.currency.round(amount) + return amount - return self.amount - @classmethod - def check_modify(cls, taxes): + @property + def _key(self): diff --git a/issue8702.diff b/issue8702.diff deleted file mode 100644 index ab021d3..0000000 --- a/issue8702.diff +++ /dev/null @@ -1,79 +0,0 @@ -diff -r 168b01453902 __init__.py ---- a/trytond/trytond/modules/stock_supply_forecast/__init__.py Mon May 06 15:17:58 2019 +0200 -+++ b/trytond/trytond/modules/stock_supply_forecast/__init__.py Fri Oct 04 10:04:50 2019 +0000 -@@ -2,10 +2,10 @@ - # this repository contains the full copyright notices and license terms. - - from trytond.pool import Pool --from . import purchase_request -+from . import stock - - - def register(): - Pool.register( -- purchase_request.Request, -- module='stock_supply_forecast', type_='model') -+ stock.StockSupply, -+ module='stock_supply_forecast', type_='wizard') -diff -r 168b01453902 purchase_request.py ---- a/trytond/trytond/modules/stock_supply_forecast/purchase_request.py Mon May 06 15:17:58 2019 +0200 -+++ /dev/null Thu Jan 01 00:00:00 1970 +0000 -@@ -1,23 +0,0 @@ --# This file is part of Tryton. The COPYRIGHT file at the top level of --# this repository contains the full copyright notices and license terms. --from trytond.pool import Pool, PoolMeta -- -- --class Request(metaclass=PoolMeta): -- __name__ = 'purchase.request' -- -- @classmethod -- def generate_requests(cls, *args, **kwargs): -- pool = Pool() -- Forecast = pool.get('stock.forecast') -- Date = pool.get('ir.date') -- -- today = Date.today() -- -- forecasts = Forecast.search([ -- ('to_date', '>=', today), -- ('state', '=', 'done'), -- ]) -- Forecast.create_moves(forecasts) -- super().generate_requests(*args, **kwargs) -- Forecast.delete_moves(forecasts) -diff -r 168b01453902 stock.py ---- /dev/null Thu Jan 01 00:00:00 1970 +0000 -+++ b/trytond/trytond/modules/stock_supply_forecast/stock.py Fri Oct 04 10:04:50 2019 +0000 -@@ -0,0 +1,22 @@ -+# This file is part of Tryton. The COPYRIGHT file at the top level of -+# this repository contains the full copyright notices and license terms. -+from trytond.pool import Pool, PoolMeta -+ -+class StockSupply(metaclass=PoolMeta): -+ __name__ = 'stock.supply' -+ -+ def transition_create_(self): -+ pool = Pool() -+ Forecast = pool.get('stock.forecast') -+ Date = pool.get('ir.date') -+ -+ today = Date.today() -+ -+ forecasts = Forecast.search([ -+ ('to_date', '>=', today), -+ ('state', '=', 'done'), -+ ]) -+ Forecast.create_moves(forecasts) -+ res = super(StockSupply, self).transition_create_() -+ Forecast.delete_moves(forecasts) -+ return res -diff -r 168b01453902 tryton.cfg ---- a/trytond/trytond/modules/stock_supply_forecast/tryton.cfg Mon May 06 15:17:58 2019 +0200 -+++ b/trytond/trytond/modules/stock_supply_forecast/tryton.cfg Fri Oct 04 10:04:50 2019 +0000 -@@ -4,3 +4,5 @@ - ir - stock_supply - stock_forecast -+extras_depend: -+ stock_supply_production diff --git a/issue8952.diff b/issue8952.diff deleted file mode 100644 index 49c7698..0000000 --- a/issue8952.diff +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/trytond/trytond/modules/country/scripts/import_postal_codes.py b/trytond/trytond/modules/country/scripts/import_postal_codes.py -index 160aed5..d0b3e8e 100755 ---- a/trytond/trytond/modules/country/scripts/import_postal_codes.py -+++ b/trytond/trytond/modules/country/scripts/import_postal_codes.py -@@ -36,7 +36,7 @@ def clean(code): - - def fetch(code): - sys.stderr.write('Fetching') -- url = 'https://download.geonames.org/export/zip/%s.zip' % code -+ url = 'https://downloads-cdn.tryton.org/geonames/%s.zip' % code - responce = urlopen(url) - data = responce.read() - with zipfile.ZipFile(BytesIO(data)) as zf: diff --git a/sale_supply_supply_on_sale_multivalue.diff b/sale_supply_supply_on_sale_multivalue.diff index cdaa7ff..a80919e 100644 --- a/sale_supply_supply_on_sale_multivalue.diff +++ b/sale_supply_supply_on_sale_multivalue.diff @@ -1,8 +1,8 @@ diff --git a/__init__.py b/__init__.py -index 4f28e75..04d18f3 100644 +index c5c21fb..484a6de 100644 --- a/trytond/trytond/modules/sale_supply/__init__.py +++ b/trytond/trytond/modules/sale_supply/__init__.py -@@ -16,6 +16,7 @@ def register(): +@@ -14,6 +14,7 @@ def register(): purchase.Purchase, stock.ShipmentIn, product.Template, @@ -11,10 +11,10 @@ index 4f28e75..04d18f3 100644 module='sale_supply', type_='model') Pool.register( diff --git a/product.py b/product.py -index b55c829..34ccc24 100644 +index 08537ed..34ccc24 100644 --- a/trytond/trytond/modules/sale_supply/product.py +++ b/trytond/trytond/modules/sale_supply/product.py -@@ -1,18 +1,35 @@ +@@ -1,17 +1,35 @@ # This file is part of Tryton. The COPYRIGHT file at the top level of # this repository contains the full copyright notices and license terms. -from trytond.model import fields @@ -33,8 +33,7 @@ index b55c829..34ccc24 100644 - supply_on_sale = fields.Boolean('Supply On Sale', - states={ - 'invisible': ~Eval('purchasable') | ~Eval('salable'), -- }, -- depends=['purchasable', 'salable']) +- }) + supply_on_sale = fields.MultiValue(fields.Boolean('Supply On Sale', + states={ + 'invisible': ~Eval('purchasable') | ~Eval('salable'), diff --git a/sao_remove_email.diff b/sao_remove_email.diff index be61879..f2703d6 100644 --- a/sao_remove_email.diff +++ b/sao_remove_email.diff @@ -1,8 +1,8 @@ diff --git a/sao/src/sao.js b/sao/src/sao.js -index 242fa32..cb817dc 100644 +index 05d86252..fcedb792 100644 --- a/sao/src/sao.js +++ b/sao/src/sao.js -@@ -1050,10 +1050,6 @@ var Sao = {}; +@@ -1081,10 +1081,6 @@ var Sao = {}; shortcut: 'ctrl+p', label: Sao.i18n.gettext('Print'), id: 'print', @@ -13,8 +13,8 @@ index 242fa32..cb817dc 100644 }, { shortcut: 'alt+shift+tab', label: Sao.i18n.gettext('Previous tab'), -diff --git a/sao/src/tab.js b/sao/src/tab.js -index d1010ca..7b65bbd 100644 +diff --git a/src/tab.js b/src/tab.js +index f9186bc9..47987500 100644 --- a/sao/src/tab.js +++ b/sao/src/tab.js @@ -91,11 +91,6 @@ @@ -29,16 +29,16 @@ index d1010ca..7b65bbd 100644 }, null, { id: 'export', icon: 'tryton-export', -@@ -522,7 +517,7 @@ +@@ -533,7 +528,7 @@ Sao.i18n.gettext('Open related records')], ['print', 'tryton-print', Sao.i18n.gettext('Print report')] -- ].forEach(function(menu_action) { -+ ].reverse().forEach(function(menu_action) { +- ].forEach(menu_action => { ++ ].reverse().forEach(menu_action => { var dropdown = jQuery('
', { 'class': 'btn-group dropdown', 'role': 'group' -@@ -548,7 +543,7 @@ +@@ -559,7 +554,7 @@ 'role': 'menu', 'aria-labelledby': menu_action[0] })) @@ -47,12 +47,12 @@ index d1010ca..7b65bbd 100644 var button = dropdown.find('button'); this.buttons[menu_action[0]] = button; dropdown -@@ -1453,7 +1448,7 @@ - if (data[0] !== 0) { - name = data[0]; +@@ -1465,7 +1460,7 @@ + name += '#' + selected; } -- var buttons = ['print', 'relate', 'email', 'save', 'attach']; -+ var buttons = ['print', 'relate', 'save', 'attach']; - buttons.forEach(function(button_id){ - var button = this.buttons[button_id]; - var can_be_sensitive = button._can_be_sensitive; + } +- var buttons = ['print', 'relate', 'email', 'save', 'attach']; ++ var buttons = ['print', 'relate', 'save', 'attach']; + for (const button_id of buttons) { + const button = this.buttons[button_id]; + let can_be_sensitive = button._can_be_sensitive; diff --git a/search_warehouse.diff b/search_warehouse.diff index 9765a54..76bd380 100644 --- a/search_warehouse.diff +++ b/search_warehouse.diff @@ -1,19 +1,20 @@ -diff -r 78ac887c5b7f location.py ---- a/trytond/trytond/modules/stock/location.py Tue Jun 12 16:16:43 2018 +0200 -+++ b/trytond/trytond/modules/stock/location.py Tue Jun 12 16:19:53 2018 +0200 -@@ -59,7 +59,7 @@ - "Flat Children", - help="Check to restrict to one level of children.") +diff --git a/location.py b/location.py +index 87104cf..3d89bdb 100644 +--- a/trytond/trytond/modules/stock/location.py ++++ b/trytond/trytond/modules/stock/location.py +@@ -72,7 +72,7 @@ class Location(DeactivableMixin, tree(), ModelSQL, ModelView): + help="Check to enforce a single level of children with no " + "grandchildren.") warehouse = fields.Function(fields.Many2One('stock.location', 'Warehouse'), - 'get_warehouse') + 'get_warehouse', searcher='search_warehouse') input_location = fields.Many2One( "stock.location", "Input", states={ 'invisible': Eval('type') != 'warehouse', -@@ -195,6 +195,27 @@ +@@ -234,6 +234,27 @@ class Location(DeactivableMixin, tree(), ModelSQL, ModelView): inactives.append(location) cls.check_inactive(inactives) - + + @classmethod + def search_warehouse(cls, name, clause): + warehouse_child_locations = cls.search([ @@ -35,6 +36,6 @@ diff -r 78ac887c5b7f location.py + warehouse_location_ids.append(location.id) + return [('id', 'in', warehouse_location_ids)] + - def check_type_for_moves(self): + def check_type_for_moves(self, field_names=None): """ Check locations with moves have types compatible with moves. """ - invalid_move_types = ['warehouse', 'view'] + pool = Pool() diff --git a/series b/series index ba47b85..e34e264 100644 --- a/series +++ b/series @@ -1,5 +1,4 @@ babi_multiprocess.diff # [trytond] babi multiprocess -trytond_test_database.diff # [trytond] avoid errors on upgrades from version 3.4 issue3932.diff # [account] rule account move and account move line by company tax_update_unit_price.diff # [account] Add the update_unit_price control on parent tax @@ -15,21 +14,16 @@ issue4482.diff # [stock] stock inventory misses company access rule search_warehouse.diff # [stock] search function for warehouse issue10467.diff # [stock_lot] add lot to grouping when assign try if lot it's required on product -issue8702.diff # [stock_supply_forecast] Support production forecast model.diff # [trytond] Allows dynamic fields in Model as required by the wizard in sale_pos_template_quantities issue9802.diff # [stock] Improve performance when partially assigning moves -issue10464.diff # [currency] Update currency rates fails - sao_colors.diff # [sao] Use the same colors as 5.4 version sao_remove_email.diff # [sao] Removes the email button from the toolbar worker_logger.diff #[trytond] Move exception handling into transaction to keep the database name -issue8952.diff # [country] Use Tryton's CDN to download postal codes Remove on 6.4 - statement_of_account.diff # [account] Cumulate balance of previous fiscal years diff --git a/statement_of_account.diff b/statement_of_account.diff index ba43d7c..72bdff3 100644 --- a/statement_of_account.diff +++ b/statement_of_account.diff @@ -1,8 +1,8 @@ diff --git a/account.py b/account.py -index 6c17998..e463b58 100644 +index fd58736..62c3e6f 100644 --- a/trytond/trytond/modules/account/account.py +++ b/trytond/trytond/modules/account/account.py -@@ -1917,14 +1917,15 @@ class GeneralLedgerAccountContext(ModelView): +@@ -2035,14 +2035,15 @@ class GeneralLedgerAccountContext(ModelView): 'General Ledger Account Context' __name__ = 'account.general_ledger.account.context' fiscalyear = fields.Many2One('account.fiscalyear', 'Fiscal Year', @@ -16,21 +16,21 @@ index 6c17998..e463b58 100644 states={ - 'invisible': Eval('from_date', False) | Eval('to_date', False), + 'invisible': (Eval('from_date', False) | Eval('to_date', False) -+ | ~Eval('fiscalyear', False)), - }, - depends=['fiscalyear', 'end_period', 'from_date', 'to_date']) ++ | ~Eval('fiscalyear', False)) + }) end_period = fields.Many2One('account.period', 'End Period', -@@ -1933,7 +1934,8 @@ class GeneralLedgerAccountContext(ModelView): + domain=[ +@@ -2050,7 +2051,8 @@ class GeneralLedgerAccountContext(ModelView): ('start_date', '>=', (Eval('start_period'), 'start_date')) ], states={ - 'invisible': Eval('from_date', False) | Eval('to_date', False), + 'invisible': (Eval('from_date', False) | Eval('to_date', False) -+ | ~Eval('fiscalyear', False)), - }, - depends=['fiscalyear', 'start_period', 'from_date', 'to_date']) ++ | ~Eval('fiscalyear', False)) + }) from_date = fields.Date("From Date", -@@ -2145,7 +2147,7 @@ class GeneralLedgerLine(ModelSQL, ModelView): + domain=[ +@@ -2252,7 +2254,7 @@ class GeneralLedgerLine(ModelSQL, ModelView): def __setup__(cls): super(GeneralLedgerLine, cls).__setup__() cls.__access__.add('account') diff --git a/trytond_test_database.diff b/trytond_test_database.diff deleted file mode 100644 index 59be1c6..0000000 --- a/trytond_test_database.diff +++ /dev/null @@ -1,12 +0,0 @@ -diff -r bbae9fd78f9e trytond/backend/postgresql/database.py ---- a/trytond/trytond/backend/postgresql/database.py Thu Mar 28 19:22:49 2019 +0100 -+++ b/trytond/trytond/backend/postgresql/database.py Mon Apr 01 14:39:22 2019 +0200 -@@ -291,7 +291,7 @@ - def _test(cls, connection, hostname=None): - cursor = connection.cursor() - tables = ('ir_model', 'ir_model_field', 'ir_ui_view', 'ir_ui_menu', -- 'res_user', 'res_group', 'ir_module', 'ir_module_dependency', -+ 'res_user', 'res_group', - 'ir_translation', 'ir_lang', 'ir_configuration') - cursor.execute('SELECT table_name FROM information_schema.tables ' - 'WHERE table_name IN %s', (tables,))