[tryton-commits] changeset in modules/stock:5.0 Do not check access when checking...
changeset de4d807e71db in modules/stock:5.0 details: https://hg.tryton.org/modules/stock?cmd=changeset=de4d807e71db description: Do not check access when checking for period closed issue11861 review431871003 (grafted from 4c66434fc3c739c80840165bfb4cfc48c5932e7b) diffstat: move.py | 31 --- 1 files changed, 16 insertions(+), 15 deletions(-) diffs (41 lines): diff -r d5f16d683630 -r de4d807e71db move.py --- a/move.py Fri Apr 15 23:19:17 2022 +0200 +++ b/move.py Sat Nov 05 10:08:31 2022 +0100 @@ -469,21 +469,22 @@ @classmethod def check_period_closed(cls, moves): Period = Pool().get('stock.period') -for company, moves in groupby(moves, lambda m: m.company): -periods = Period.search([ -('state', '=', 'closed'), -('company', '=', company.id), -], order=[('date', 'DESC')], limit=1) -if periods: -period, = periods -for move in moves: -date = (move.effective_date if move.effective_date -else move.planned_date) -if date and date <= period.date: -cls.raise_user_error('period_closed', { -'move': move.rec_name, -'period': period.rec_name, -}) +with Transaction().set_context(_check_access=False): +for company, moves in groupby(moves, lambda m: m.company): +periods = Period.search([ +('state', '=', 'closed'), +('company', '=', company.id), +], order=[('date', 'DESC')], limit=1) +if periods: +period, = periods +for move in moves: +date = (move.effective_date if move.effective_date +else move.planned_date) +if date and date <= period.date: +cls.raise_user_error('period_closed', { +'move': move.rec_name, +'period': period.rec_name, +}) def get_rec_name(self, name): return ("%s%s %s"
[tryton-commits] changeset in modules/stock:6.0 Do not check access when checking...
changeset b6db31f4ffb9 in modules/stock:6.0 details: https://hg.tryton.org/modules/stock?cmd=changeset=b6db31f4ffb9 description: Do not check access when checking for period closed issue11861 review431871003 (grafted from 4c66434fc3c739c80840165bfb4cfc48c5932e7b) diffstat: move.py | 31 --- 1 files changed, 16 insertions(+), 15 deletions(-) diffs (41 lines): diff -r 51a51197018e -r b6db31f4ffb9 move.py --- a/move.py Mon Oct 17 23:54:21 2022 +0200 +++ b/move.py Sat Nov 05 10:08:31 2022 +0100 @@ -554,21 +554,22 @@ @classmethod def check_period_closed(cls, moves): Period = Pool().get('stock.period') -for company, moves in groupby(moves, lambda m: m.company): -periods = Period.search([ -('state', '=', 'closed'), -('company', '=', company.id), -], order=[('date', 'DESC')], limit=1) -if periods: -period, = periods -for move in moves: -date = (move.effective_date if move.effective_date -else move.planned_date) -if date and date <= period.date: -raise AccessError( -gettext('stock.msg_move_modify_period_close', -move=move.rec_name, -period=period.rec_name)) +with Transaction().set_context(_check_access=False): +for company, moves in groupby(moves, lambda m: m.company): +periods = Period.search([ +('state', '=', 'closed'), +('company', '=', company.id), +], order=[('date', 'DESC')], limit=1) +if periods: +period, = periods +for move in moves: +date = (move.effective_date if move.effective_date +else move.planned_date) +if date and date <= period.date: +raise AccessError( +gettext('stock.msg_move_modify_period_close', +move=move.rec_name, +period=period.rec_name)) def get_rec_name(self, name): pool = Pool()
[tryton-commits] changeset in modules/stock:6.2 Do not check access when checking...
changeset cd7c9ebb8bea in modules/stock:6.2 details: https://hg.tryton.org/modules/stock?cmd=changeset=cd7c9ebb8bea description: Do not check access when checking for period closed issue11861 review431871003 (grafted from 4c66434fc3c739c80840165bfb4cfc48c5932e7b) diffstat: move.py | 31 --- 1 files changed, 16 insertions(+), 15 deletions(-) diffs (41 lines): diff -r 18d93198021c -r cd7c9ebb8bea move.py --- a/move.py Mon Oct 17 23:53:53 2022 +0200 +++ b/move.py Sat Nov 05 10:08:31 2022 +0100 @@ -541,21 +541,22 @@ @classmethod def check_period_closed(cls, moves): Period = Pool().get('stock.period') -for company, moves in groupby(moves, lambda m: m.company): -periods = Period.search([ -('state', '=', 'closed'), -('company', '=', company.id), -], order=[('date', 'DESC')], limit=1) -if periods: -period, = periods -for move in moves: -date = (move.effective_date if move.effective_date -else move.planned_date) -if date and date <= period.date: -raise AccessError( -gettext('stock.msg_move_modify_period_close', -move=move.rec_name, -period=period.rec_name)) +with Transaction().set_context(_check_access=False): +for company, moves in groupby(moves, lambda m: m.company): +periods = Period.search([ +('state', '=', 'closed'), +('company', '=', company.id), +], order=[('date', 'DESC')], limit=1) +if periods: +period, = periods +for move in moves: +date = (move.effective_date if move.effective_date +else move.planned_date) +if date and date <= period.date: +raise AccessError( +gettext('stock.msg_move_modify_period_close', +move=move.rec_name, +period=period.rec_name)) def get_rec_name(self, name): pool = Pool()
[tryton-commits] changeset in modules/stock:6.4 Do not check access when checking...
changeset dc97ce40c5ad in modules/stock:6.4 details: https://hg.tryton.org/modules/stock?cmd=changeset=dc97ce40c5ad description: Do not check access when checking for period closed issue11861 review431871003 (grafted from 4c66434fc3c739c80840165bfb4cfc48c5932e7b) diffstat: move.py | 31 --- 1 files changed, 16 insertions(+), 15 deletions(-) diffs (41 lines): diff -r 596e0f9beb68 -r dc97ce40c5ad move.py --- a/move.py Sat Nov 05 18:00:10 2022 +0100 +++ b/move.py Sat Nov 05 10:08:31 2022 +0100 @@ -529,21 +529,22 @@ @classmethod def check_period_closed(cls, moves): Period = Pool().get('stock.period') -for company, moves in groupby(moves, lambda m: m.company): -periods = Period.search([ -('state', '=', 'closed'), -('company', '=', company.id), -], order=[('date', 'DESC')], limit=1) -if periods: -period, = periods -for move in moves: -date = (move.effective_date if move.effective_date -else move.planned_date) -if date and date <= period.date: -raise AccessError( -gettext('stock.msg_move_modify_period_close', -move=move.rec_name, -period=period.rec_name)) +with Transaction().set_context(_check_access=False): +for company, moves in groupby(moves, lambda m: m.company): +periods = Period.search([ +('state', '=', 'closed'), +('company', '=', company.id), +], order=[('date', 'DESC')], limit=1) +if periods: +period, = periods +for move in moves: +date = (move.effective_date if move.effective_date +else move.planned_date) +if date and date <= period.date: +raise AccessError( +gettext('stock.msg_move_modify_period_close', +move=move.rec_name, +period=period.rec_name)) def get_rec_name(self, name): pool = Pool()
[tryton-commits] changeset in modules/stock:6.6 Do not check access when checking...
changeset 4b5640194282 in modules/stock:6.6 details: https://hg.tryton.org/modules/stock?cmd=changeset=4b5640194282 description: Do not check access when checking for period closed issue11861 review431871003 (grafted from 4c66434fc3c739c80840165bfb4cfc48c5932e7b) diffstat: move.py | 31 --- 1 files changed, 16 insertions(+), 15 deletions(-) diffs (41 lines): diff -r 9f5af60aa75d -r 4b5640194282 move.py --- a/move.py Mon Oct 31 16:54:13 2022 +0100 +++ b/move.py Sat Nov 05 10:08:31 2022 +0100 @@ -544,21 +544,22 @@ @classmethod def check_period_closed(cls, moves): Period = Pool().get('stock.period') -for company, moves in groupby(moves, lambda m: m.company): -periods = Period.search([ -('state', '=', 'closed'), -('company', '=', company.id), -], order=[('date', 'DESC')], limit=1) -if periods: -period, = periods -for move in moves: -date = (move.effective_date if move.effective_date -else move.planned_date) -if date and date <= period.date: -raise AccessError( -gettext('stock.msg_move_modify_period_close', -move=move.rec_name, -period=period.rec_name)) +with Transaction().set_context(_check_access=False): +for company, moves in groupby(moves, lambda m: m.company): +periods = Period.search([ +('state', '=', 'closed'), +('company', '=', company.id), +], order=[('date', 'DESC')], limit=1) +if periods: +period, = periods +for move in moves: +date = (move.effective_date if move.effective_date +else move.planned_date) +if date and date <= period.date: +raise AccessError( +gettext('stock.msg_move_modify_period_close', +move=move.rec_name, +period=period.rec_name)) def get_rec_name(self, name): pool = Pool()
[tryton-commits] changeset in modules/stock:default Do not check access when chec...
changeset 4c66434fc3c7 in modules/stock:default details: https://hg.tryton.org/modules/stock?cmd=changeset=4c66434fc3c7 description: Do not check access when checking for period closed issue11861 review431871003 diffstat: move.py | 31 --- 1 files changed, 16 insertions(+), 15 deletions(-) diffs (41 lines): diff -r af8a0f9a361d -r 4c66434fc3c7 move.py --- a/move.py Mon Oct 31 16:54:14 2022 +0100 +++ b/move.py Sat Nov 05 10:08:31 2022 +0100 @@ -544,21 +544,22 @@ @classmethod def check_period_closed(cls, moves): Period = Pool().get('stock.period') -for company, moves in groupby(moves, lambda m: m.company): -periods = Period.search([ -('state', '=', 'closed'), -('company', '=', company.id), -], order=[('date', 'DESC')], limit=1) -if periods: -period, = periods -for move in moves: -date = (move.effective_date if move.effective_date -else move.planned_date) -if date and date <= period.date: -raise AccessError( -gettext('stock.msg_move_modify_period_close', -move=move.rec_name, -period=period.rec_name)) +with Transaction().set_context(_check_access=False): +for company, moves in groupby(moves, lambda m: m.company): +periods = Period.search([ +('state', '=', 'closed'), +('company', '=', company.id), +], order=[('date', 'DESC')], limit=1) +if periods: +period, = periods +for move in moves: +date = (move.effective_date if move.effective_date +else move.planned_date) +if date and date <= period.date: +raise AccessError( +gettext('stock.msg_move_modify_period_close', +move=move.rec_name, +period=period.rec_name)) def get_rec_name(self, name): pool = Pool()
[tryton-commits] changeset in trytond:6.0 Fix wrong xml id for recursion_error me...
changeset d153ef37 in trytond:6.0 details: https://hg.tryton.org/trytond?cmd=changeset=d153ef37 description: Fix wrong xml id for recursion_error message issue11727 review439581003 (grafted from fc8196fd371f76af5e748c15b6a5065d69884c04) diffstat: trytond/model/tree.py | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diffs (21 lines): diff -r ce982fabd69a -r d153ef37 trytond/model/tree.py --- a/trytond/model/tree.py Sat Oct 15 22:08:25 2022 +0200 +++ b/trytond/model/tree.py Fri Oct 21 13:25:30 2022 +0200 @@ -112,7 +112,7 @@ parent_name = ', '.join(getattr(r, name) for r in getattr(record, parent)) raise RecursionError( -gettext('ir.recursion_error', +gettext('ir.msg_recursion_error', rec_name=getattr(record, name), parent_rec_name=parent_name)) walker = list(chain(*( @@ -125,7 +125,7 @@ parent_name = getattr( getattr(record, parent), name) raise RecursionError( -gettext('ir.recursion_error', +gettext('ir.msg_recursion_error', rec_name=getattr(record, name), parent_rec_name=parent_name)) walker = (getattr(walker, parent) not in visited
[tryton-commits] changeset in trytond:6.2 Fix wrong xml id for recursion_error me...
changeset e4816f030e5a in trytond:6.2 details: https://hg.tryton.org/trytond?cmd=changeset=e4816f030e5a description: Fix wrong xml id for recursion_error message issue11727 review439581003 (grafted from fc8196fd371f76af5e748c15b6a5065d69884c04) diffstat: trytond/model/tree.py | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diffs (21 lines): diff -r 9444c2eb9be8 -r e4816f030e5a trytond/model/tree.py --- a/trytond/model/tree.py Sat Oct 15 22:08:25 2022 +0200 +++ b/trytond/model/tree.py Fri Oct 21 13:25:30 2022 +0200 @@ -112,7 +112,7 @@ parent_name = ', '.join(getattr(r, name) for r in getattr(record, parent)) raise RecursionError( -gettext('ir.recursion_error', +gettext('ir.msg_recursion_error', rec_name=getattr(record, name), parent_rec_name=parent_name)) walker = list(chain(*( @@ -125,7 +125,7 @@ parent_name = getattr( getattr(record, parent), name) raise RecursionError( -gettext('ir.recursion_error', +gettext('ir.msg_recursion_error', rec_name=getattr(record, name), parent_rec_name=parent_name)) walker = (getattr(walker, parent) not in visited
[tryton-commits] changeset in trytond:6.4 Fix wrong xml id for recursion_error me...
changeset 11397ee82996 in trytond:6.4 details: https://hg.tryton.org/trytond?cmd=changeset=11397ee82996 description: Fix wrong xml id for recursion_error message issue11727 review439581003 (grafted from fc8196fd371f76af5e748c15b6a5065d69884c04) diffstat: trytond/model/tree.py | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diffs (21 lines): diff -r bac74c2ea3cd -r 11397ee82996 trytond/model/tree.py --- a/trytond/model/tree.py Sat Oct 15 22:08:25 2022 +0200 +++ b/trytond/model/tree.py Fri Oct 21 13:25:30 2022 +0200 @@ -125,7 +125,7 @@ parent_name = ', '.join(getattr(r, name) for r in getattr(record, parent)) raise RecursionError( -gettext('ir.recursion_error', +gettext('ir.msg_recursion_error', rec_name=getattr(record, name), parent_rec_name=parent_name)) walker = list(chain(*( @@ -138,7 +138,7 @@ parent_name = getattr( getattr(record, parent), name) raise RecursionError( -gettext('ir.recursion_error', +gettext('ir.msg_recursion_error', rec_name=getattr(record, name), parent_rec_name=parent_name)) walker = (getattr(walker, parent) not in visited
[tryton-commits] changeset in modules/attendance:6.0 Exclude active record from t...
changeset c35ce5915761 in modules/attendance:6.0 details: https://hg.tryton.org/modules/attendance?cmd=changeset=c35ce5915761 description: Exclude active record from type search issue11729 review435911044 (grafted from 4ac40db3d36dac93d46e807c4430d7b0aa1f5fd2) diffstat: attendance.py | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diffs (17 lines): diff -r dc0d0b6a041f -r c35ce5915761 attendance.py --- a/attendance.py Sat Oct 02 00:30:16 2021 +0200 +++ b/attendance.py Thu Oct 20 09:44:24 2022 +0200 @@ -140,11 +140,12 @@ attendance=record.rec_name, period=period_date)) -@fields.depends('employee', 'at') +@fields.depends('employee', 'at', 'id') def on_change_with_type(self): records = self.search([ ('employee', '=', self.employee), ('at', '<', self.at), +('id', '!=', self.id), ], order=[('at', 'desc')], limit=1)
[tryton-commits] changeset in modules/attendance:6.2 Exclude active record from t...
changeset 71357bb1f812 in modules/attendance:6.2 details: https://hg.tryton.org/modules/attendance?cmd=changeset=71357bb1f812 description: Exclude active record from type search issue11729 review435911044 (grafted from 4ac40db3d36dac93d46e807c4430d7b0aa1f5fd2) diffstat: attendance.py | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diffs (17 lines): diff -r 43bc508cfd0d -r 71357bb1f812 attendance.py --- a/attendance.py Mon Nov 01 17:09:59 2021 +0100 +++ b/attendance.py Thu Oct 20 09:44:24 2022 +0200 @@ -140,11 +140,12 @@ attendance=record.rec_name, period=period_date)) -@fields.depends('employee', 'at') +@fields.depends('employee', 'at', 'id') def on_change_with_type(self): records = self.search([ ('employee', '=', self.employee), ('at', '<', self.at), +('id', '!=', self.id), ], order=[('at', 'desc')], limit=1)
[tryton-commits] changeset in modules/attendance:6.4 Exclude active record from t...
changeset a376e33dba85 in modules/attendance:6.4 details: https://hg.tryton.org/modules/attendance?cmd=changeset=a376e33dba85 description: Exclude active record from type search issue11729 review435911044 (grafted from 4ac40db3d36dac93d46e807c4430d7b0aa1f5fd2) diffstat: attendance.py | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diffs (17 lines): diff -r 4c2b851f444b -r a376e33dba85 attendance.py --- a/attendance.py Mon May 02 16:59:03 2022 +0200 +++ b/attendance.py Thu Oct 20 09:44:24 2022 +0200 @@ -141,11 +141,12 @@ attendance=record.rec_name, period=period_date)) -@fields.depends('employee', 'at') +@fields.depends('employee', 'at', 'id') def on_change_with_type(self): records = self.search([ ('employee', '=', self.employee), ('at', '<', self.at), +('id', '!=', self.id), ], order=[('at', 'desc')], limit=1)
[tryton-commits] changeset in modules/account_es:6.0 Display empty values on VAT ...
changeset 32d8d3942d5e in modules/account_es:6.0 details: https://hg.tryton.org/modules/account_es?cmd=changeset=32d8d3942d5e description: Display empty values on VAT Book report for None values issue11588 review443361003 (grafted from e1d799e2f866c5e3b950dc6bdfb3a84753a1f143) diffstat: reporting_tax.py | 9 ++--- 1 files changed, 6 insertions(+), 3 deletions(-) diffs (31 lines): diff -r bf3878d8831b -r 32d8d3942d5e reporting_tax.py --- a/reporting_tax.py Wed Sep 01 23:00:04 2021 +0200 +++ b/reporting_tax.py Sat Oct 22 01:09:53 2022 +0200 @@ -923,6 +923,8 @@ @classmethod def format_decimal(cls, n): +if n is None: +return '' if not isinstance(n, Decimal): n = Decimal(n) sign = '-' if n < 0 else '' @@ -969,14 +971,15 @@ (record.party_tax_identifier.es_code() if record.party_tax_identifier else ''), country_code(record), -record.party.name[:40], +record.party.name[:40] if record.party.name else '', '', cls.format_decimal(record.invoice.total_amount), cls.format_decimal(record.base_amount), -cls.format_decimal(record.tax.rate * 100), +(cls.format_decimal(record.tax.rate * 100) +if record.tax.rate is not None else ''), cls.format_decimal(record.tax_amount), (cls.format_decimal(record.surcharge_tax.rate * 100) -if record.surcharge_tax else ''), +if record.surcharge_tax is not None else ''), (cls.format_decimal(record.surcharge_tax_amount) if record.surcharge_tax else ''), '',
[tryton-commits] changeset in modules/account_es:6.2 Display empty values on VAT ...
changeset 4a0519704b39 in modules/account_es:6.2 details: https://hg.tryton.org/modules/account_es?cmd=changeset=4a0519704b39 description: Display empty values on VAT Book report for None values issue11588 review443361003 (grafted from e1d799e2f866c5e3b950dc6bdfb3a84753a1f143) diffstat: reporting_tax.py | 9 ++--- 1 files changed, 6 insertions(+), 3 deletions(-) diffs (31 lines): diff -r c6d8663adf20 -r 4a0519704b39 reporting_tax.py --- a/reporting_tax.py Mon Nov 01 17:34:01 2021 +0100 +++ b/reporting_tax.py Sat Oct 22 01:09:53 2022 +0200 @@ -913,6 +913,8 @@ @classmethod def format_decimal(cls, n): +if n is None: +return '' if not isinstance(n, Decimal): n = Decimal(n) sign = '-' if n < 0 else '' @@ -957,14 +959,15 @@ (record.party_tax_identifier.es_code() if record.party_tax_identifier else ''), country_code(record), -record.party.name[:40], +record.party.name[:40] if record.party.name else '', '', cls.format_decimal(record.invoice.total_amount), cls.format_decimal(record.base_amount), -cls.format_decimal(record.tax.rate * 100), +(cls.format_decimal(record.tax.rate * 100) +if record.tax.rate is not None else ''), cls.format_decimal(record.tax_amount), (cls.format_decimal(record.surcharge_tax.rate * 100) -if record.surcharge_tax else ''), +if record.surcharge_tax is not None else ''), (cls.format_decimal(record.surcharge_tax_amount) if record.surcharge_tax else ''), '',
[tryton-commits] changeset in modules/account_es:6.4 Display empty values on VAT ...
changeset bf74ba846340 in modules/account_es:6.4 details: https://hg.tryton.org/modules/account_es?cmd=changeset=bf74ba846340 description: Display empty values on VAT Book report for None values issue11588 review443361003 (grafted from e1d799e2f866c5e3b950dc6bdfb3a84753a1f143) diffstat: reporting_tax.py | 9 ++--- 1 files changed, 6 insertions(+), 3 deletions(-) diffs (31 lines): diff -r 1913d8fd82c5 -r bf74ba846340 reporting_tax.py --- a/reporting_tax.py Mon May 02 17:48:41 2022 +0200 +++ b/reporting_tax.py Sat Oct 22 01:09:53 2022 +0200 @@ -922,6 +922,8 @@ @classmethod def format_decimal(cls, n): +if n is None: +return '' if not isinstance(n, Decimal): n = Decimal(n) sign = '-' if n < 0 else '' @@ -966,14 +968,15 @@ (record.party_tax_identifier.es_code() if record.party_tax_identifier else ''), country_code(record), -record.party.name[:40], +record.party.name[:40] if record.party.name else '', '', cls.format_decimal(record.invoice.total_amount), cls.format_decimal(record.base_amount), -cls.format_decimal(record.tax.rate * 100), +(cls.format_decimal(record.tax.rate * 100) +if record.tax.rate is not None else ''), cls.format_decimal(record.tax_amount), (cls.format_decimal(record.surcharge_tax.rate * 100) -if record.surcharge_tax else ''), +if record.surcharge_tax is not None else ''), (cls.format_decimal(record.surcharge_tax_amount) if record.surcharge_tax else ''), '',
[tryton-commits] changeset in modules/account_es:default Display empty values on ...
changeset e1d799e2f866 in modules/account_es:default details: https://hg.tryton.org/modules/account_es?cmd=changeset=e1d799e2f866 description: Display empty values on VAT Book report for None values issue11588 review443361003 diffstat: reporting_tax.py | 9 ++--- 1 files changed, 6 insertions(+), 3 deletions(-) diffs (31 lines): diff -r 6c93d0080b5d -r e1d799e2f866 reporting_tax.py --- a/reporting_tax.py Fri Oct 21 13:20:46 2022 +0200 +++ b/reporting_tax.py Sat Oct 22 01:09:53 2022 +0200 @@ -921,6 +921,8 @@ @classmethod def format_decimal(cls, n): +if n is None: +return '' if not isinstance(n, Decimal): n = Decimal(n) sign = '-' if n < 0 else '' @@ -965,14 +967,15 @@ (record.party_tax_identifier.es_code() if record.party_tax_identifier else ''), country_code(record), -record.party.name[:40], +record.party.name[:40] if record.party.name else '', '', cls.format_decimal(record.invoice.total_amount), cls.format_decimal(record.base_amount), -cls.format_decimal(record.tax.rate * 100), +(cls.format_decimal(record.tax.rate * 100) +if record.tax.rate is not None else ''), cls.format_decimal(record.tax_amount), (cls.format_decimal(record.surcharge_tax.rate * 100) -if record.surcharge_tax else ''), +if record.surcharge_tax is not None else ''), (cls.format_decimal(record.surcharge_tax_amount) if record.surcharge_tax else ''), '',
[tryton-commits] changeset in trytond:default Fix wrong xml id for recursion_erro...
changeset fc8196fd371f in trytond:default details: https://hg.tryton.org/trytond?cmd=changeset=fc8196fd371f description: Fix wrong xml id for recursion_error message issue11727 review439581003 diffstat: trytond/model/tree.py | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diffs (21 lines): diff -r bd9ad6eedf5c -r fc8196fd371f trytond/model/tree.py --- a/trytond/model/tree.py Sat Oct 15 22:08:25 2022 +0200 +++ b/trytond/model/tree.py Fri Oct 21 13:25:30 2022 +0200 @@ -125,7 +125,7 @@ parent_name = ', '.join(getattr(r, name) for r in getattr(record, parent)) raise RecursionError( -gettext('ir.recursion_error', +gettext('ir.msg_recursion_error', rec_name=getattr(record, name), parent_rec_name=parent_name)) walker = list(chain(*( @@ -138,7 +138,7 @@ parent_name = getattr( getattr(record, parent), name) raise RecursionError( -gettext('ir.recursion_error', +gettext('ir.msg_recursion_error', rec_name=getattr(record, name), parent_rec_name=parent_name)) walker = (getattr(walker, parent) not in visited
[tryton-commits] changeset in modules/account_es:default Add intracomunitary serv...
changeset 6c93d0080b5d in modules/account_es:default details: https://hg.tryton.org/modules/account_es?cmd=changeset=6c93d0080b5d description: Add intracomunitary services on intracomunitary iva devengado issue11808 review437511020 diffstat: tax.xml| 14 ++ tax_normal.xml | 14 ++ tax_pyme.xml | 14 ++ 3 files changed, 42 insertions(+), 0 deletions(-) diffs (72 lines): diff -r 7db896752ed7 -r 6c93d0080b5d tax.xml --- a/tax.xml Sun Oct 16 14:14:09 2022 +0200 +++ b/tax.xml Fri Oct 21 13:20:46 2022 +0200 @@ -1080,6 +1080,20 @@ tax invoice + + + ++ +tax +invoice + + + + ++ +tax +invoice + diff -r 7db896752ed7 -r 6c93d0080b5d tax_normal.xml --- a/tax_normal.xmlSun Oct 16 14:14:09 2022 +0200 +++ b/tax_normal.xmlFri Oct 21 13:20:46 2022 +0200 @@ -1080,6 +1080,20 @@ tax invoice + + + ++ +tax +invoice + + + + ++ +tax +invoice + diff -r 7db896752ed7 -r 6c93d0080b5d tax_pyme.xml --- a/tax_pyme.xml Sun Oct 16 14:14:09 2022 +0200 +++ b/tax_pyme.xml Fri Oct 21 13:20:46 2022 +0200 @@ -1080,6 +1080,20 @@ tax invoice + + + ++ +tax +invoice + + + + ++ +tax +invoice +
[tryton-commits] changeset in modules/attendance:default Exclude active record fr...
changeset 4ac40db3d36d in modules/attendance:default details: https://hg.tryton.org/modules/attendance?cmd=changeset=4ac40db3d36d description: Exclude active record from type search issue11729 review435911044 diffstat: attendance.py | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diffs (17 lines): diff -r e2aa7e244d47 -r 4ac40db3d36d attendance.py --- a/attendance.py Sun Oct 16 14:14:10 2022 +0200 +++ b/attendance.py Thu Oct 20 09:44:24 2022 +0200 @@ -137,11 +137,12 @@ attendance=record.rec_name, period=period_date)) -@fields.depends('employee', 'at') +@fields.depends('employee', 'at', 'id') def on_change_with_type(self): records = self.search([ ('employee', '=', self.employee), ('at', '<', self.at), +('id', '!=', self.id), ], order=[('at', 'desc')], limit=1)
[tryton-commits] changeset in modules/account_asset:6.2 Use existing XML id for m...
changeset 5918bb98a093 in modules/account_asset:6.2 details: https://hg.tryton.org/modules/account_asset?cmd=changeset=5918bb98a093 description: Use existing XML id for messages issue11725 review415731003 (grafted from 816b8de69d9353d4bfaeb9e4e5ccc4ad6a4c70c5) diffstat: asset.py | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diffs (21 lines): diff -r c668e2dc5221 -r 5918bb98a093 asset.py --- a/asset.py Fri May 06 23:39:45 2022 +0200 +++ b/asset.py Tue Oct 04 18:14:05 2022 +0200 @@ -658,7 +658,7 @@ for asset in assets: if asset.lines: raise AccessError( -gettext('account_asset.msg_draft_lines', +gettext('account_asset.msg_asset_draft_lines', asset=asset.rec_name)) @classmethod @@ -718,7 +718,7 @@ for asset in assets: if asset.state != 'draft': raise AccessError( -gettext('account_asset.msg_delete_draft', +gettext('account_asset.msg_asset_delete_draft', asset=asset.rec_name)) return super(Asset, cls).delete(assets)
[tryton-commits] changeset in modules/account_asset:6.4 Use existing XML id for m...
changeset a9fbd64b1c2e in modules/account_asset:6.4 details: https://hg.tryton.org/modules/account_asset?cmd=changeset=a9fbd64b1c2e description: Use existing XML id for messages issue11725 review415731003 (grafted from 816b8de69d9353d4bfaeb9e4e5ccc4ad6a4c70c5) diffstat: asset.py | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diffs (21 lines): diff -r 75d7593a20f0 -r a9fbd64b1c2e asset.py --- a/asset.py Mon May 02 17:22:07 2022 +0200 +++ b/asset.py Tue Oct 04 18:14:05 2022 +0200 @@ -643,7 +643,7 @@ for asset in assets: if asset.lines: raise AccessError( -gettext('account_asset.msg_draft_lines', +gettext('account_asset.msg_asset_draft_lines', asset=asset.rec_name)) @classmethod @@ -703,7 +703,7 @@ for asset in assets: if asset.state != 'draft': raise AccessError( -gettext('account_asset.msg_delete_draft', +gettext('account_asset.msg_asset_delete_draft', asset=asset.rec_name)) return super(Asset, cls).delete(assets)
[tryton-commits] changeset in modules/account_asset:default Use existing XML id f...
changeset 816b8de69d93 in modules/account_asset:default details: https://hg.tryton.org/modules/account_asset?cmd=changeset=816b8de69d93 description: Use existing XML id for messages issue11725 review415731003 diffstat: asset.py | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diffs (21 lines): diff -r 495179c38c97 -r 816b8de69d93 asset.py --- a/asset.py Wed Sep 14 19:27:28 2022 +0200 +++ b/asset.py Tue Oct 04 18:14:05 2022 +0200 @@ -649,7 +649,7 @@ for asset in assets: if asset.lines: raise AccessError( -gettext('account_asset.msg_draft_lines', +gettext('account_asset.msg_asset_draft_lines', asset=asset.rec_name)) @classmethod @@ -709,7 +709,7 @@ for asset in assets: if asset.state != 'draft': raise AccessError( -gettext('account_asset.msg_delete_draft', +gettext('account_asset.msg_asset_delete_draft', asset=asset.rec_name)) return super(Asset, cls).delete(assets)
[tryton-commits] changeset in modules/stock:default Use date instead of datetime ...
changeset f80b86865a95 in modules/stock:default details: https://hg.tryton.org/modules/stock?cmd=changeset=f80b86865a95 description: Use date instead of datetime on delivery note report issue11748 review431671003 diffstat: delivery_note.fodt | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diffs (12 lines): diff -r 449fb2bdb0c0 -r f80b86865a95 delivery_note.fodt --- a/delivery_note.fodtThu Sep 29 23:42:06 2022 +0200 +++ b/delivery_note.fodtFri Sep 30 09:01:20 2022 +0200 @@ -459,7 +459,7 @@ line /for Delivery Note - Shipment Number: shipment.numberCustomer Code: shipment.customer.codeReference: shipment.origins or , if (shipment.origins and shipment.reference) else shipment.reference or Date: format_date(shipment.effective_date and shipment.effective_date or datetime.datetime.today(), shipment.delivery_address.party.lang) + Shipment Number: shipment.numberCustomer Code: shipment.customer.codeReference: shipment.origins or , if (shipment.origins and shipment.reference) else shipment.reference or Date: format_date(shipment.effective_date or datetime.date.today(), shipment.delivery_address.party.lang)
[tryton-commits] changeset in weblate:default Translated using Weblate (Spanish)
changeset 8616be30803c in weblate:default details: https://hg.tryton.org/weblate?cmd=changeset=8616be30803c description: Translated using Weblate (Spanish) Currently translated at 100.0% (310 of 310 strings) Translation: Tryton/party Translate-URL: https://translate.tryton.org/projects/tryton/party/es/ diffstat: modules/party/locale/es.po | 8 1 files changed, 4 insertions(+), 4 deletions(-) diffs (29 lines): diff -r bb2c73ccaedb -r 8616be30803c modules/party/locale/es.po --- a/modules/party/locale/es.poTue Jul 19 07:27:25 2022 + +++ b/modules/party/locale/es.poTue Jul 19 07:27:29 2022 + @@ -1,13 +1,13 @@ # msgid "" msgstr "" -"PO-Revision-Date: 2022-04-14 12:09+\n" -"Last-Translator: David Blanco Bautista \n" +"PO-Revision-Date: 2022-07-20 08:08+0000\n" +"Last-Translator: Adrià Tarroja Caubet \n" "Language: es\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=n != 1;\n" -"X-Generator: Weblate 4.11.2\n" +"X-Generator: Weblate 4.13.1\n" msgctxt "field:ir.email.template,contact_mechanism:" msgid "Contact Mechanism" @@ -936,7 +936,7 @@ msgctxt "selection:party.configuration,identifier_types:" msgid "Guatemala Tax Number" -msgstr "Número fiscal Guatemaltenco" +msgstr "Identificador fiscal Guatemalteco" msgctxt "selection:party.configuration,identifier_types:" msgid "Hungarian VAT Number"
[tryton-commits] changeset in weblate:default Translated using Weblate (Catalan)
changeset bb2c73ccaedb in weblate:default details: https://hg.tryton.org/weblate?cmd=changeset=bb2c73ccaedb description: Translated using Weblate (Catalan) Currently translated at 100.0% (310 of 310 strings) Translation: Tryton/party Translate-URL: https://translate.tryton.org/projects/tryton/party/ca/ diffstat: modules/party/locale/ca.po | 8 1 files changed, 4 insertions(+), 4 deletions(-) diffs (29 lines): diff -r 1995553a8e43 -r bb2c73ccaedb modules/party/locale/ca.po --- a/modules/party/locale/ca.poTue Jul 19 07:27:05 2022 + +++ b/modules/party/locale/ca.poTue Jul 19 07:27:25 2022 + @@ -1,13 +1,13 @@ # msgid "" msgstr "" -"PO-Revision-Date: 2022-04-14 12:09+\n" -"Last-Translator: David Blanco Bautista \n" +"PO-Revision-Date: 2022-07-20 08:08+0000\n" +"Last-Translator: Adrià Tarroja Caubet \n" "Language: ca\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=n != 1;\n" -"X-Generator: Weblate 4.11.2\n" +"X-Generator: Weblate 4.13.1\n" msgctxt "field:ir.email.template,contact_mechanism:" msgid "Contact Mechanism" @@ -934,7 +934,7 @@ msgctxt "selection:party.configuration,identifier_types:" msgid "Guatemala Tax Number" -msgstr "Número fiscal Guatemaltenc" +msgstr "Identificador fiscal Guatemalenc" msgctxt "selection:party.configuration,identifier_types:" msgid "Hungarian VAT Number"
[tryton-commits] changeset in weblate:default Translated using Weblate (Spanish)
changeset 1995553a8e43 in weblate:default details: https://hg.tryton.org/weblate?cmd=changeset=1995553a8e43 description: Translated using Weblate (Spanish) Currently translated at 100.0% (140 of 140 strings) Translation: Tryton/account_payment_sepa Translate-URL: https://translate.tryton.org/projects/tryton/account_payment_sepa/es/ diffstat: modules/account_payment_sepa/locale/es.po | 8 1 files changed, 4 insertions(+), 4 deletions(-) diffs (29 lines): diff -r 22b68cf21220 -r 1995553a8e43 modules/account_payment_sepa/locale/es.po --- a/modules/account_payment_sepa/locale/es.po Sun Jul 17 20:10:01 2022 + +++ b/modules/account_payment_sepa/locale/es.po Tue Jul 19 07:27:05 2022 + @@ -1,13 +1,13 @@ # msgid "" msgstr "" -"PO-Revision-Date: 2022-04-20 10:15+\n" -"Last-Translator: Hodei Navarro \n" +"PO-Revision-Date: 2022-07-20 08:08+0000\n" +"Last-Translator: Adrià Tarroja Caubet \n" "Language: es\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=n != 1;\n" -"X-Generator: Weblate 4.11.2\n" +"X-Generator: Weblate 4.13.1\n" msgctxt "field:account.configuration,sepa_mandate_sequence:" msgid "SEPA Mandate Sequence" @@ -296,7 +296,7 @@ msgctxt "model:ir.message,text:msg_party_no_id" msgid "The party \"%(party)s\" is missing a \"%(type)s\" identifier." -msgstr "Falta el identificicador \"%(type)s\" para el tercero \"%(party)s\"." +msgstr "Falta el identificador \"%(type)s\" para el tercero \"%(party)s\"." msgctxt "model:ir.message,text:msg_payment_process_no_bank" msgid ""
[tryton-commits] changeset in modules/account:5.0 Do not compare debit or credit ...
changeset 330ed6684e82 in modules/account:5.0 details: https://hg.tryton.org/modules/account?cmd=changeset=330ed6684e82 description: Do not compare debit or credit to None when searching issue11568 review417441003 (grafted from 6d06c13574dddb21e36970afd27ea674ddaf4de6) diffstat: account.py | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diffs (21 lines): diff -r 037869b1e733 -r 330ed6684e82 account.py --- a/account.pyFri Jun 03 19:41:54 2022 +0200 +++ b/account.pyFri Jun 24 09:19:13 2022 +0200 @@ -1468,7 +1468,7 @@ break ids = [a.id for a in accounts -if operator_(getattr(a, fname), operand)] +if operand is not None and operator_(getattr(a, fname), operand)] return [('id', 'in', ids)] @classmethod @@ -1518,7 +1518,7 @@ }.get(operator_, lambda v, l: False) ids = [a.id for a in accounts -if operator_(getattr(a, name), operand)] +if operand is not None and operator_(getattr(a, name), operand)] return [('id', 'in', ids)] def get_currency_digits(self, name):
[tryton-commits] changeset in modules/account:6.0 Do not compare debit or credit ...
changeset 9a6dadee9e9b in modules/account:6.0 details: https://hg.tryton.org/modules/account?cmd=changeset=9a6dadee9e9b description: Do not compare debit or credit to None when searching issue11568 review417441003 (grafted from 6d06c13574dddb21e36970afd27ea674ddaf4de6) diffstat: account.py | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diffs (21 lines): diff -r f6ab5fe8c4cd -r 9a6dadee9e9b account.py --- a/account.pyFri Jun 03 19:41:06 2022 +0200 +++ b/account.pyFri Jun 24 09:19:13 2022 +0200 @@ -1832,7 +1832,7 @@ break ids = [a.id for a in accounts -if operator_(getattr(a, fname), operand)] +if operand is not None and operator_(getattr(a, fname), operand)] return [('id', 'in', ids)] @classmethod @@ -1880,7 +1880,7 @@ }.get(operator_, lambda v, l: False) ids = [a.id for a in accounts -if operator_(getattr(a, name), operand)] +if operand is not None and operator_(getattr(a, name), operand)] return [('id', 'in', ids)] def get_currency(self, name):
[tryton-commits] changeset in modules/account:6.2 Do not compare debit or credit ...
changeset b8f51d159001 in modules/account:6.2 details: https://hg.tryton.org/modules/account?cmd=changeset=b8f51d159001 description: Do not compare debit or credit to None when searching issue11568 review417441003 (grafted from 6d06c13574dddb21e36970afd27ea674ddaf4de6) diffstat: account.py | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diffs (21 lines): diff -r 745eac45f8e1 -r b8f51d159001 account.py --- a/account.pyFri Jun 03 19:39:33 2022 +0200 +++ b/account.pyFri Jun 24 09:19:13 2022 +0200 @@ -1762,7 +1762,7 @@ break ids = [a.id for a in accounts -if operator_(getattr(a, fname), operand)] +if operand is not None and operator_(getattr(a, fname), operand)] return [('id', 'in', ids)] @classmethod @@ -1810,7 +1810,7 @@ }.get(operator_, lambda v, l: False) ids = [a.id for a in accounts -if operator_(getattr(a, name), operand)] +if operand is not None and operator_(getattr(a, name), operand)] return [('id', 'in', ids)] def get_currency(self, name):
[tryton-commits] changeset in modules/account:6.4 Do not compare debit or credit ...
changeset 1de89b5bb246 in modules/account:6.4 details: https://hg.tryton.org/modules/account?cmd=changeset=1de89b5bb246 description: Do not compare debit or credit to None when searching issue11568 review417441003 (grafted from 6d06c13574dddb21e36970afd27ea674ddaf4de6) diffstat: account.py | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diffs (21 lines): diff -r 0da16af7d520 -r 1de89b5bb246 account.py --- a/account.pyFri Jun 03 19:38:58 2022 +0200 +++ b/account.pyFri Jun 24 09:19:13 2022 +0200 @@ -1952,7 +1952,7 @@ break ids = [a.id for a in accounts -if operator_(getattr(a, fname), operand)] +if operand is not None and operator_(getattr(a, fname), operand)] return [('id', 'in', ids)] @classmethod @@ -2000,7 +2000,7 @@ }.get(operator_, lambda v, l: False) ids = [a.id for a in accounts -if operator_(getattr(a, name), operand)] +if operand is not None and operator_(getattr(a, name), operand)] return [('id', 'in', ids)] def get_currency(self, name):
[tryton-commits] changeset in modules/account_payment_sepa:6.2 Filter out empty m...
changeset 8814ed56f0bb in modules/account_payment_sepa:6.2 details: https://hg.tryton.org/modules/account_payment_sepa?cmd=changeset=8814ed56f0bb description: Filter out empty mandates before lock issue11537 review419251003 (grafted from 3b3e1664763dbfb124106e2907acd6130d43ff89) diffstat: payment.py | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diffs (12 lines): diff -r 664715ed94f7 -r 8814ed56f0bb payment.py --- a/payment.pyFri Dec 03 21:54:30 2021 +0100 +++ b/payment.pyMon Jun 20 23:43:27 2022 +0200 @@ -214,7 +214,7 @@ if self.kind == 'receivable': payments = list(self.payments) mandates = Payment.get_sepa_mandates(payments) -Mandate.lock(mandates) +Mandate.lock(filter(None, mandates)) sequence_types = {} for payment, mandate in zip(payments, mandates): if not mandate:
[tryton-commits] changeset in modules/account_payment_sepa:6.4 Filter out empty m...
changeset 87cea3ad3077 in modules/account_payment_sepa:6.4 details: https://hg.tryton.org/modules/account_payment_sepa?cmd=changeset=87cea3ad3077 description: Filter out empty mandates before lock issue11537 review419251003 (grafted from 3b3e1664763dbfb124106e2907acd6130d43ff89) diffstat: payment.py | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diffs (12 lines): diff -r 7a2132322d4f -r 87cea3ad3077 payment.py --- a/payment.pyMon May 02 17:33:19 2022 +0200 +++ b/payment.pyMon Jun 20 23:43:27 2022 +0200 @@ -211,7 +211,7 @@ if self.kind == 'receivable': payments = list(self.payments) mandates = Payment.get_sepa_mandates(payments) -Mandate.lock(mandates) +Mandate.lock(filter(None, mandates)) sequence_types = {} for payment, mandate in zip(payments, mandates): if not mandate:
[tryton-commits] changeset in modules/account:default Do not compare debit or cre...
changeset 6d06c13574dd in modules/account:default details: https://hg.tryton.org/modules/account?cmd=changeset=6d06c13574dd description: Do not compare debit or credit to None when searching issue11568 review417441003 diffstat: account.py | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diffs (21 lines): diff -r fa8a0d293726 -r 6d06c13574dd account.py --- a/account.pyWed Jun 15 22:01:00 2022 +0200 +++ b/account.pyFri Jun 24 09:19:13 2022 +0200 @@ -1966,7 +1966,7 @@ break ids = [a.id for a in accounts -if operator_(getattr(a, fname), operand)] +if operand is not None and operator_(getattr(a, fname), operand)] return [('id', 'in', ids)] @classmethod @@ -2014,7 +2014,7 @@ }.get(operator_, lambda v, l: False) ids = [a.id for a in accounts -if operator_(getattr(a, name), operand)] +if operand is not None and operator_(getattr(a, name), operand)] return [('id', 'in', ids)] def get_currency(self, name):
[tryton-commits] changeset in modules/purchase:default Use product record name fo...
changeset 409ed6796a4a in modules/purchase:default details: https://hg.tryton.org/modules/purchase?cmd=changeset=409ed6796a4a description: Use product record name for supplier product without name nor code issue11532 review433201003 diffstat: product.py | 20 +--- 1 files changed, 13 insertions(+), 7 deletions(-) diffs (31 lines): diff -r d5fed246f6bf -r 409ed6796a4a product.py --- a/product.pyTue May 31 23:57:32 2022 +0200 +++ b/product.pyTue Jun 21 23:40:00 2022 +0200 @@ -360,14 +360,20 @@ self.currency, = row def get_rec_name(self, name): -if self.name: -name = self.name -elif self.product: -name = self.product.name +if not self.name and not self.code: +if self.product: +name = self.product.rec_name +else: +name = self.template.rec_name else: -name = self.template.name -if self.code: -name = '[' + self.code + '] ' + name +if self.name: +name = self.name +elif self.product: +name = self.product.name +else: +name = self.template.name +if self.code: +name = '[' + self.code + ']' + name return name @classmethod
[tryton-commits] changeset in modules/account_payment_sepa:default Filter out emp...
changeset 3b3e1664763d in modules/account_payment_sepa:default details: https://hg.tryton.org/modules/account_payment_sepa?cmd=changeset=3b3e1664763d description: Filter out empty mandates before lock issue11537 review419251003 diffstat: payment.py | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diffs (12 lines): diff -r e64e6bee8d7e -r 3b3e1664763d payment.py --- a/payment.pyMon May 02 17:33:20 2022 +0200 +++ b/payment.pyMon Jun 20 23:43:27 2022 +0200 @@ -211,7 +211,7 @@ if self.kind == 'receivable': payments = list(self.payments) mandates = Payment.get_sepa_mandates(payments) -Mandate.lock(mandates) +Mandate.lock(filter(None, mandates)) sequence_types = {} for payment, mandate in zip(payments, mandates): if not mandate:
[tryton-commits] changeset in trytond:default Display asserted inherit expression...
changeset b928473f65e5 in trytond:default details: https://hg.tryton.org/trytond?cmd=changeset=b928473f65e5 description: Display asserted inherit expression when nothing found issue11560 review419311003 diffstat: trytond/ir/ui/view.py | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) diffs (15 lines): diff -r ecaf2dd04f42 -r b928473f65e5 trytond/ir/ui/view.py --- a/trytond/ir/ui/view.py Wed Jun 15 18:52:38 2022 +0200 +++ b/trytond/ir/ui/view.py Wed Jun 15 18:59:58 2022 +0200 @@ -265,8 +265,9 @@ def inherit_apply(cls, tree, inherit): root_inherit = inherit.getroottree().getroot() for element in root_inherit: -targets = tree.xpath(element.get('expr')) -assert targets +expr = element.get('expr') +targets = tree.xpath(expr) +assert targets, "No elements found for expression %r" % expr for target in targets: position = element.get('position', 'inside') new_tree = getattr(cls, '_inherit_apply_%s' % position)(
[tryton-commits] changeset in trytond:6.0 Do not copy avatars nor uuid
changeset e6d874f3d9e1 in trytond:6.0 details: https://hg.tryton.org/trytond?cmd=changeset=e6d874f3d9e1 description: Do not copy avatars nor uuid issue11518 review433161003 (grafted from 769a985452d4b9566764b9a7afe7e854a75d7b6c) diffstat: trytond/ir/avatar.py| 10 ++ trytond/model/avatar.py | 9 + 2 files changed, 19 insertions(+), 0 deletions(-) diffs (39 lines): diff -r 0e36574311f8 -r e6d874f3d9e1 trytond/ir/avatar.py --- a/trytond/ir/avatar.py Thu May 19 22:02:33 2022 +0200 +++ b/trytond/ir/avatar.py Wed May 25 17:38:34 2022 +0200 @@ -70,6 +70,16 @@ super().write(*args) cls.clear_cache(avatars) +@classmethod +def copy(cls, avatars, default=None): +if default is None: +default = {} +else: +default = default.copy() +default.setdefault('uuid', None) +default.setdefault('cache', None) +return super().copy(avatars, default=default) + @property def url(self): if self.image_id or self.image: diff -r 0e36574311f8 -r e6d874f3d9e1 trytond/model/avatar.py --- a/trytond/model/avatar.py Thu May 19 22:02:33 2022 +0200 +++ b/trytond/model/avatar.py Wed May 25 17:38:34 2022 +0200 @@ -67,6 +67,15 @@ record.avatar = avatar cls.save(records) +@classmethod +def copy(cls, avatars, default=None): +if default is None: +default = {} +else: +default = default.copy() +default.setdefault('avatars', []) +return super().copy(avatars, default=default) + if default: @classmethod
[tryton-commits] changeset in trytond:6.2 Do not copy avatars nor uuid
changeset ac5fee1a52fe in trytond:6.2 details: https://hg.tryton.org/trytond?cmd=changeset=ac5fee1a52fe description: Do not copy avatars nor uuid issue11518 review433161003 (grafted from 769a985452d4b9566764b9a7afe7e854a75d7b6c) diffstat: trytond/ir/avatar.py| 10 ++ trytond/model/avatar.py | 9 + 2 files changed, 19 insertions(+), 0 deletions(-) diffs (39 lines): diff -r 023a1e8364ac -r ac5fee1a52fe trytond/ir/avatar.py --- a/trytond/ir/avatar.py Thu May 19 22:02:33 2022 +0200 +++ b/trytond/ir/avatar.py Wed May 25 17:38:34 2022 +0200 @@ -71,6 +71,16 @@ super().write(*args) cls.clear_cache(avatars) +@classmethod +def copy(cls, avatars, default=None): +if default is None: +default = {} +else: +default = default.copy() +default.setdefault('uuid', None) +default.setdefault('cache', None) +return super().copy(avatars, default=default) + @property def url(self): if self.image_id or self.image: diff -r 023a1e8364ac -r ac5fee1a52fe trytond/model/avatar.py --- a/trytond/model/avatar.py Thu May 19 22:02:33 2022 +0200 +++ b/trytond/model/avatar.py Wed May 25 17:38:34 2022 +0200 @@ -67,6 +67,15 @@ record.avatar = avatar cls.save(records) +@classmethod +def copy(cls, avatars, default=None): +if default is None: +default = {} +else: +default = default.copy() +default.setdefault('avatars', []) +return super().copy(avatars, default=default) + if default: @classmethod
[tryton-commits] changeset in trytond:6.4 Do not copy avatars nor uuid
changeset a554cf1f05c6 in trytond:6.4 details: https://hg.tryton.org/trytond?cmd=changeset=a554cf1f05c6 description: Do not copy avatars nor uuid issue11518 review433161003 (grafted from 769a985452d4b9566764b9a7afe7e854a75d7b6c) diffstat: trytond/ir/avatar.py| 10 ++ trytond/model/avatar.py | 9 + 2 files changed, 19 insertions(+), 0 deletions(-) diffs (39 lines): diff -r c86f360b30ac -r a554cf1f05c6 trytond/ir/avatar.py --- a/trytond/ir/avatar.py Thu May 19 22:02:33 2022 +0200 +++ b/trytond/ir/avatar.py Wed May 25 17:38:34 2022 +0200 @@ -71,6 +71,16 @@ super().write(*args) cls.clear_cache(avatars) +@classmethod +def copy(cls, avatars, default=None): +if default is None: +default = {} +else: +default = default.copy() +default.setdefault('uuid', None) +default.setdefault('cache', None) +return super().copy(avatars, default=default) + @property def url(self): if self.image_id or self.image: diff -r c86f360b30ac -r a554cf1f05c6 trytond/model/avatar.py --- a/trytond/model/avatar.py Thu May 19 22:02:33 2022 +0200 +++ b/trytond/model/avatar.py Wed May 25 17:38:34 2022 +0200 @@ -67,6 +67,15 @@ record.avatar = avatar cls.save(records) +@classmethod +def copy(cls, avatars, default=None): +if default is None: +default = {} +else: +default = default.copy() +default.setdefault('avatars', []) +return super().copy(avatars, default=default) + if default: @classmethod
[tryton-commits] changeset in tryton-tweet:default Update broken links
changeset 7e73a479cca5 in tryton-tweet:default details: https://hg.tryton.org/tryton-tweet?cmd=changeset=7e73a479cca5 description: Update broken links Setuptools moved to github Tryton uses custom domain for readthedocs issue11519 review431161003 diffstat: tips | 18 +- 1 files changed, 9 insertions(+), 9 deletions(-) diffs (57 lines): diff -r 9c6dfb74a2ad -r 7e73a479cca5 tips --- a/tips Wed May 11 11:19:07 2022 +0200 +++ b/tips Thu May 26 10:31:28 2022 +0200 @@ -1,5 +1,5 @@ Always use the Tryton module name for the folder (even with prefix) because of -https://bitbucket.org/pypa/setuptools/issues/230 +https://github.com/pypa/setuptools/issues/230 https://github.com/pypa/pip/issues/3160 You can display the same field many times in the same view with different widgets. @@ -22,22 +22,22 @@ https://trytond.readthedocs.org/en/latest/topics/views/extension.html#extending-view Any button is linked to a method, use decorator to launch an action on client-side -https://trytond.readthedocs.org/en/latest/ref/models/models.html?highlight=ModelView.button#trytond.model.ModelView.button_action +https://docs.tryton.org/projects/server/en/latest/ref/models.html?highlight=ModelView.button#trytond.model.ModelView.button_action -Customize how to order on a field with the attribute order_field -https://trytond.readthedocs.org/en/latest/ref/models/fields.html#trytond.model.fields.Field.order_field -example: http://hg.tryton.org/modules/party/file/fc0862209992/party.py#l37 +Customize how to order on a field with a classmethod returning a list of SQL expression +https://docs.tryton.org/projects/server/en/latest/ref/fields.html#ordering +example: https://hg.tryton.org/modules/party/file/6c6c3c0d2e1d/party.py#l111 on_change can add/update/delete lines in On2Many recursively You can call on_change methods from within an on_change -https://docs.tryton.org/projects/server/en/latest/ref/models/fields.html#trytond.model.fields.depends +https://docs.tryton.org/projects/server/en/latest/ref/fields.html#trytond.model.fields.depends Create a plugin for client, just drop the module in the directory and define a method get_plugins returning the methods By default, records created via XML are immutable but behavior can be override: -https://trytond.readthedocs.org/en/latest/ref/models/models.html#trytond.model.ModelStorage.check_xml_record +https://docs.tryton.org/projects/server/en/latest/ref/models.html#trytond.model.ModelStorage.check_xml_record currency field on sale, purchase and invoice becomes read-only once a line is added #UXP @@ -52,7 +52,7 @@ state open required is supported on xxx2Many fields on client-side and validated on server-side -https://trytond.readthedocs.org/en/latest/ref/models/fields.html#required +https://docs.tryton.org/projects/server/en/latest/ref/fields.html#trytond.model.fields.Field.required Define a view by inheriting from an other model, useful for model sharing the same definition @@ -73,7 +73,7 @@ username To activate the history on a ModelSQL just set _history = True -https://trytond.readthedocs.org/en/latest/ref/models/models.html#trytond.model.ModelSQL._history +https://docs.tryton.org/projects/server/en/latest/ref/models.html#trytond.model.ModelSQL._history There are 3 options to retrieve reports: Open, E-Mail and Print
[tryton-commits] changeset in trytond:default Do not copy avatars nor uuid
changeset 769a985452d4 in trytond:default details: https://hg.tryton.org/trytond?cmd=changeset=769a985452d4 description: Do not copy avatars nor uuid issue11518 review433161003 diffstat: trytond/ir/avatar.py| 10 ++ trytond/model/avatar.py | 9 + 2 files changed, 19 insertions(+), 0 deletions(-) diffs (39 lines): diff -r 9710c9206e90 -r 769a985452d4 trytond/ir/avatar.py --- a/trytond/ir/avatar.py Thu May 19 22:12:32 2022 +0200 +++ b/trytond/ir/avatar.py Wed May 25 17:38:34 2022 +0200 @@ -71,6 +71,16 @@ super().write(*args) cls.clear_cache(avatars) +@classmethod +def copy(cls, avatars, default=None): +if default is None: +default = {} +else: +default = default.copy() +default.setdefault('uuid', None) +default.setdefault('cache', None) +return super().copy(avatars, default=default) + @property def url(self): if self.image_id or self.image: diff -r 9710c9206e90 -r 769a985452d4 trytond/model/avatar.py --- a/trytond/model/avatar.py Thu May 19 22:12:32 2022 +0200 +++ b/trytond/model/avatar.py Wed May 25 17:38:34 2022 +0200 @@ -67,6 +67,15 @@ record.avatar = avatar cls.save(records) +@classmethod +def copy(cls, avatars, default=None): +if default is None: +default = {} +else: +default = default.copy() +default.setdefault('avatars', []) +return super().copy(avatars, default=default) + if default: @classmethod
[tryton-commits] changeset in weblate:default Translated using Weblate (Spanish)
changeset 662d2726add9 in weblate:default details: https://hg.tryton.org/weblate?cmd=changeset=662d2726add9 description: Translated using Weblate (Spanish) Currently translated at 100.0% (803 of 803 strings) Translation: Tryton/stock Translate-URL: https://translate.tryton.org/projects/tryton/stock/es/ diffstat: modules/stock/locale/es.po | 8 1 files changed, 4 insertions(+), 4 deletions(-) diffs (29 lines): diff -r d2a57db2f63c -r 662d2726add9 modules/stock/locale/es.po --- a/modules/stock/locale/es.poMon May 09 09:23:28 2022 + +++ b/modules/stock/locale/es.poFri May 20 11:24:05 2022 + @@ -1,13 +1,13 @@ # msgid "" msgstr "" -"PO-Revision-Date: 2022-04-26 16:45+\n" -"Last-Translator: Sergi Almacellas Abellana \n" +"PO-Revision-Date: 2022-05-20 18:01+0000\n" +"Last-Translator: Adrià Tarroja Caubet \n" "Language: es\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=n != 1;\n" -"X-Generator: Weblate 4.12\n" +"X-Generator: Weblate 4.12.1\n" msgctxt "field:party.address,delivery:" msgid "Delivery" @@ -1051,7 +1051,7 @@ msgctxt "help:party.contact_mechanism,delivery:" msgid "Check to use for delivery." -msgstr "Marcar para utlizar en los envíos." +msgstr "Marcar para utilizar en los envíos." msgctxt "help:party.party,customer_location:" msgid "The default destination location for stock sent to the party."
[tryton-commits] changeset in modules/account_asset:6.2 Clear revisions when dupl...
changeset c59cb937054e in modules/account_asset:6.2 details: https://hg.tryton.org/modules/account_asset?cmd=changeset=c59cb937054e description: Clear revisions when duplicating asset issue11274 review380401002 (grafted from 136f549bbc50f579469807bafb21fe393f652504) diffstat: asset.py | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diffs (11 lines): diff -r cd82c15e6a98 -r c59cb937054e asset.py --- a/asset.py Tue Apr 19 23:24:03 2022 +0200 +++ b/asset.py Tue Apr 19 23:24:18 2022 +0200 @@ -710,6 +710,7 @@ default.setdefault('number', None) default.setdefault('supplier_invoice_line', None) default.setdefault('move') +default.setdefault('revisions', []) return super(Asset, cls).copy(assets, default=default) @classmethod
[tryton-commits] changeset in modules/account_asset:5.0 Clear update moves when d...
changeset 10f20a7a8885 in modules/account_asset:5.0 details: https://hg.tryton.org/modules/account_asset?cmd=changeset=10f20a7a8885 description: Clear update moves when duplicating asset issue11274 review386121002 (grafted from 2d59fd7207988c3c1924dab46e7d05a8e117a98d) diffstat: asset.py | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diffs (11 lines): diff -r 60cf0b33db16 -r 10f20a7a8885 asset.py --- a/asset.py Thu Jun 17 21:42:55 2021 +0200 +++ b/asset.py Tue Apr 19 23:24:03 2022 +0200 @@ -622,6 +622,7 @@ else: default = default.copy() default.setdefault('lines', []) +default.setdefault('update_moves', []) default.setdefault('number', None) default.setdefault('supplier_invoice_line', None) default.setdefault('move')
[tryton-commits] changeset in modules/account_asset:6.0 Clear update moves when d...
changeset afb2ab0cbbc4 in modules/account_asset:6.0 details: https://hg.tryton.org/modules/account_asset?cmd=changeset=afb2ab0cbbc4 description: Clear update moves when duplicating asset issue11274 review386121002 (grafted from 2d59fd7207988c3c1924dab46e7d05a8e117a98d) diffstat: asset.py | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diffs (11 lines): diff -r 0b79eed0c9f3 -r afb2ab0cbbc4 asset.py --- a/asset.py Thu Sep 16 23:52:43 2021 +0200 +++ b/asset.py Tue Apr 19 23:24:03 2022 +0200 @@ -702,6 +702,7 @@ else: default = default.copy() default.setdefault('lines', []) +default.setdefault('update_moves', []) default.setdefault('number', None) default.setdefault('supplier_invoice_line', None) default.setdefault('move')
[tryton-commits] changeset in modules/account_asset:6.2 Clear update moves when d...
changeset cd82c15e6a98 in modules/account_asset:6.2 details: https://hg.tryton.org/modules/account_asset?cmd=changeset=cd82c15e6a98 description: Clear update moves when duplicating asset issue11274 review386121002 (grafted from 2d59fd7207988c3c1924dab46e7d05a8e117a98d) diffstat: asset.py | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diffs (11 lines): diff -r 0439eb1984cd -r cd82c15e6a98 asset.py --- a/asset.py Mon Nov 01 17:21:25 2021 +0100 +++ b/asset.py Tue Apr 19 23:24:03 2022 +0200 @@ -706,6 +706,7 @@ else: default = default.copy() default.setdefault('lines', []) +default.setdefault('update_moves', []) default.setdefault('number', None) default.setdefault('supplier_invoice_line', None) default.setdefault('move')
[tryton-commits] changeset in modules/account_asset:default Clear revisions when ...
changeset 136f549bbc50 in modules/account_asset:default details: https://hg.tryton.org/modules/account_asset?cmd=changeset=136f549bbc50 description: Clear revisions when duplicating asset issue11274 review380401002 diffstat: asset.py | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diffs (11 lines): diff -r 2d59fd720798 -r 136f549bbc50 asset.py --- a/asset.py Tue Apr 19 23:24:03 2022 +0200 +++ b/asset.py Tue Apr 19 23:24:18 2022 +0200 @@ -695,6 +695,7 @@ default.setdefault('number', None) default.setdefault('supplier_invoice_line', None) default.setdefault('move') +default.setdefault('revisions', []) return super(Asset, cls).copy(assets, default=default) @classmethod
[tryton-commits] changeset in modules/account_asset:default Clear update moves wh...
changeset 2d59fd720798 in modules/account_asset:default details: https://hg.tryton.org/modules/account_asset?cmd=changeset=2d59fd720798 description: Clear update moves when duplicating asset issue11274 review386121002 diffstat: asset.py | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diffs (11 lines): diff -r 23d4d364904b -r 2d59fd720798 asset.py --- a/asset.py Mon Apr 18 19:28:34 2022 +0200 +++ b/asset.py Tue Apr 19 23:24:03 2022 +0200 @@ -691,6 +691,7 @@ else: default = default.copy() default.setdefault('lines', []) +default.setdefault('update_moves', []) default.setdefault('number', None) default.setdefault('supplier_invoice_line', None) default.setdefault('move')
[tryton-commits] changeset in modules/account_payment:default Mute reconciled pay...
changeset 54bf20acff6a in modules/account_payment:default details: https://hg.tryton.org/modules/account_payment?cmd=changeset=54bf20acff6a description: Mute reconciled payable/receivable lines issue10951 review364371002 diffstat: account.xml| 5 + view/move_line_list_to_pay.xml | 8 2 files changed, 13 insertions(+), 0 deletions(-) diffs (26 lines): diff -r be1b2097219a -r 54bf20acff6a account.xml --- a/account.xml Sun Apr 10 19:11:37 2022 +0200 +++ b/account.xml Mon Apr 11 20:13:16 2022 +0200 @@ -161,5 +161,10 @@ invoice_form + +account.move.line + +move_line_list_to_pay + diff -r be1b2097219a -r 54bf20acff6a view/move_line_list_to_pay.xml --- /dev/null Thu Jan 01 00:00:00 1970 + +++ b/view/move_line_list_to_pay.xmlMon Apr 11 20:13:16 2022 +0200 @@ -0,0 +1,8 @@ + + + + + + +
[tryton-commits] changeset in modules/account_move_line_grouping:default Mute rec...
changeset 3ee8d1c7f719 in modules/account_move_line_grouping:default details: https://hg.tryton.org/modules/account_move_line_grouping?cmd=changeset=3ee8d1c7f719 description: Mute reconciled payable/receivable lines issue10951 review364371002 diffstat: __init__.py | 1 + account.py | 14 ++ 2 files changed, 15 insertions(+), 0 deletions(-) diffs (35 lines): diff -r b8976a778c85 -r 3ee8d1c7f719 __init__.py --- a/__init__.py Mon Apr 11 20:06:58 2022 +0200 +++ b/__init__.py Mon Apr 11 20:13:16 2022 +0200 @@ -11,6 +11,7 @@ def register(): Pool.register( account.Move, +account.MoveLine, account.MoveLineGroup, account.MoveLineGroup_MoveLine, module='account_move_line_grouping', type_='model') diff -r b8976a778c85 -r 3ee8d1c7f719 account.py --- a/account.pyMon Apr 11 20:06:58 2022 +0200 +++ b/account.pyMon Apr 11 20:13:16 2022 +0200 @@ -19,6 +19,20 @@ 'account.move.line.group', 'move', "Grouped Lines", readonly=True) +class MoveLine(metaclass=PoolMeta): +__name__ = 'account.move.line' + +@classmethod +def _view_reconciliation_muted(cls): +pool = Pool() +ModelData = pool.get('ir.model.data') +muted = super()._view_reconciliation_muted() +muted.add(ModelData.get_id( +'account_move_line_grouping', +'move_line_group_view_list_move')) +return muted + + class MoveLineGroup(MoveLineMixin, ModelSQL, ModelView): "Account Move Line Group" __name__ = 'account.move.line.group'
[tryton-commits] changeset in modules/account_invoice:default Mute reconciled pay...
changeset 8a3ddc2e8aa5 in modules/account_invoice:default details: https://hg.tryton.org/modules/account_invoice?cmd=changeset=8a3ddc2e8aa5 description: Mute reconciled payable/receivable lines issue10951 review364371002 diffstat: account.py | 9 + view/move_line_list_to_pay.xml | 5 ++--- 2 files changed, 11 insertions(+), 3 deletions(-) diffs (33 lines): diff -r 69d87d4691ea -r 8a3ddc2e8aa5 account.py --- a/account.pyMon Apr 11 19:19:54 2022 +0200 +++ b/account.pyMon Apr 11 20:13:16 2022 +0200 @@ -247,6 +247,15 @@ cls._check_modify_exclude.add('invoice_payment') @classmethod +def _view_reconciliation_muted(cls): +pool = Pool() +ModelData = pool.get('ir.model.data') +muted = super()._view_reconciliation_muted() +muted.add(ModelData.get_id( +'account_invoice', 'move_line_view_list_to_pay')) +return muted + +@classmethod def _get_origin(cls): return super()._get_origin() + [ 'account.invoice.line', 'account.invoice.tax'] diff -r 69d87d4691ea -r 8a3ddc2e8aa5 view/move_line_list_to_pay.xml --- a/view/move_line_list_to_pay.xmlMon Apr 11 19:19:54 2022 +0200 +++ b/view/move_line_list_to_pay.xmlMon Apr 11 20:13:16 2022 +0200 @@ -3,8 +3,7 @@ this repository contains the full copyright notices and license terms. --> - - + - +
[tryton-commits] changeset in modules/account:default Mute reconciled payable/rec...
changeset f2f4f885c238 in modules/account:default details: https://hg.tryton.org/modules/account?cmd=changeset=f2f4f885c238 description: Mute reconciled payable/receivable lines issue10951 review364371002 diffstat: CHANGELOG | 1 + move.py | 17 + 2 files changed, 18 insertions(+), 0 deletions(-) diffs (35 lines): diff -r 56e9b82a66f1 -r f2f4f885c238 CHANGELOG --- a/CHANGELOG Mon Apr 11 19:19:54 2022 +0200 +++ b/CHANGELOG Mon Apr 11 20:13:16 2022 +0200 @@ -1,3 +1,4 @@ +* Mute reconciled payable/receivable lines * Add delegated amount on move lines * Enforce same type for children account as their parent * Show debit / credit columns in ledgers when they contain lines diff -r 56e9b82a66f1 -r f2f4f885c238 move.py --- a/move.py Mon Apr 11 19:19:54 2022 +0200 +++ b/move.py Mon Apr 11 20:13:16 2022 +0200 @@ -1207,6 +1207,23 @@ line=line.rec_name)) @classmethod +def view_attributes(cls): +attributes = super().view_attributes() +view_ids = cls._view_reconciliation_muted() +if Transaction().context.get('view_id') in view_ids: +attributes.append( +('/tree', 'visual', +If(Bool(Eval('reconciliation')), 'muted', ''))) +return attributes + +@classmethod +def _view_reconciliation_muted(cls): +pool = Pool() +ModelData = pool.get('ir.model.data') +return {ModelData.get_id( +'account', 'move_line_view_list_payable_receivable')} + +@classmethod def delete(cls, lines): Move = Pool().get('account.move') cls.check_modify(lines)
[tryton-commits] changeset in modules/sale_supply_production:6.0 Plan production ...
changeset 12da10733024 in modules/sale_supply_production:6.0 details: https://hg.tryton.org/modules/sale_supply_production?cmd=changeset=12da10733024 description: Plan production for today when there is no shipping date issue11258 review356031002 (grafted from 947ef95c15d70bc3c30670f9898b3dd897aee62f) diffstat: sale.py | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diffs (12 lines): diff -r cd39b13a5377 -r 12da10733024 sale.py --- a/sale.py Mon May 03 16:06:09 2021 +0200 +++ b/sale.py Fri Feb 18 09:40:35 2022 +0100 @@ -85,7 +85,7 @@ for l in invoice_lines)): return -date = self.shipping_date +date = self.shipping_date or today if date <= today: date = today else:
[tryton-commits] changeset in modules/sale_supply_production:6.2 Plan production ...
changeset fcf8e2994421 in modules/sale_supply_production:6.2 details: https://hg.tryton.org/modules/sale_supply_production?cmd=changeset=fcf8e2994421 description: Plan production for today when there is no shipping date issue11258 review356031002 (grafted from 947ef95c15d70bc3c30670f9898b3dd897aee62f) diffstat: sale.py | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diffs (12 lines): diff -r 598405106d82 -r fcf8e2994421 sale.py --- a/sale.py Mon Nov 01 17:32:38 2021 +0100 +++ b/sale.py Fri Feb 18 09:40:35 2022 +0100 @@ -89,7 +89,7 @@ for l in invoice_lines)): return -date = self.shipping_date +date = self.shipping_date or today if date <= today: date = today else:
[tryton-commits] changeset in modules/sale:5.0 Reuse planned shipping date when a...
changeset a8fd858ca41d in modules/sale:5.0 details: https://hg.tryton.org/modules/sale?cmd=changeset=a8fd858ca41d description: Reuse planned shipping date when all moves are cancelled issue11258 review366751002 (grafted from 3bfef79b48cbaad9b4832c89dd081a37bbb07b57) diffstat: sale.py | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diffs (17 lines): diff -r 2b298943cc39 -r a8fd858ca41d sale.py --- a/sale.py Wed Feb 16 23:52:13 2022 +0100 +++ b/sale.py Fri Feb 18 09:34:30 2022 +0100 @@ -1280,10 +1280,10 @@ def on_change_with_shipping_date(self, name=None): pool = Pool() Date = pool.get('ir.date') -if self.moves: +moves = [m for m in self.moves if m.state != 'cancel'] +if moves: dates = filter( -None, (m.effective_date or m.planned_date for m in self.moves -if m.state != 'cancel')) +None, (m.effective_date or m.planned_date for m in moves)) return min(dates, default=None) if self.product and self.quantity is not None and self.quantity > 0: date = self.sale.sale_date if self.sale else None
[tryton-commits] changeset in modules/sale:6.0 Reuse planned shipping date when a...
changeset 7d1c5191a580 in modules/sale:6.0 details: https://hg.tryton.org/modules/sale?cmd=changeset=7d1c5191a580 description: Reuse planned shipping date when all moves are cancelled issue11258 review366751002 (grafted from 3bfef79b48cbaad9b4832c89dd081a37bbb07b57) diffstat: sale.py | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diffs (17 lines): diff -r f6cb77954888 -r 7d1c5191a580 sale.py --- a/sale.py Wed Feb 16 23:51:54 2022 +0100 +++ b/sale.py Fri Feb 18 09:34:30 2022 +0100 @@ -1418,10 +1418,10 @@ @fields.depends('moves', methods=['planned_shipping_date']) def on_change_with_shipping_date(self, name=None): -if self.moves: +moves = [m for m in self.moves if m.state != 'cancelled'] +if moves: dates = filter( -None, (m.effective_date or m.planned_date for m in self.moves -if m.state != 'cancelled')) +None, (m.effective_date or m.planned_date for m in moves)) return min(dates, default=None) return self.planned_shipping_date
[tryton-commits] changeset in modules/sale:6.2 Reuse planned shipping date when a...
changeset 06852e6de3f3 in modules/sale:6.2 details: https://hg.tryton.org/modules/sale?cmd=changeset=06852e6de3f3 description: Reuse planned shipping date when all moves are cancelled issue11258 review366751002 (grafted from 3bfef79b48cbaad9b4832c89dd081a37bbb07b57) diffstat: sale.py | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diffs (17 lines): diff -r f35d1ae82e33 -r 06852e6de3f3 sale.py --- a/sale.py Wed Feb 16 23:51:31 2022 +0100 +++ b/sale.py Fri Feb 18 09:34:30 2022 +0100 @@ -1434,10 +1434,10 @@ @fields.depends('moves', methods=['planned_shipping_date']) def on_change_with_shipping_date(self, name=None): -if self.moves: +moves = [m for m in self.moves if m.state != 'cancelled'] +if moves: dates = filter( -None, (m.effective_date or m.planned_date for m in self.moves -if m.state != 'cancelled')) +None, (m.effective_date or m.planned_date for m in moves)) return min(dates, default=None) return self.planned_shipping_date
[tryton-commits] changeset in modules/sale_supply_production:default Plan product...
changeset 947ef95c15d7 in modules/sale_supply_production:default details: https://hg.tryton.org/modules/sale_supply_production?cmd=changeset=947ef95c15d7 description: Plan production for today when there is no shipping date issue11258 review356031002 diffstat: sale.py | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diffs (12 lines): diff -r 09d3209d099c -r 947ef95c15d7 sale.py --- a/sale.py Sun Jan 23 12:54:56 2022 +0100 +++ b/sale.py Fri Feb 18 09:40:35 2022 +0100 @@ -91,7 +91,7 @@ for l in invoice_lines)): return -date = self.shipping_date +date = self.shipping_date or today if date <= today: date = today else:
[tryton-commits] changeset in modules/sale:default Reuse planned shipping date wh...
changeset 3bfef79b48cb in modules/sale:default details: https://hg.tryton.org/modules/sale?cmd=changeset=3bfef79b48cb description: Reuse planned shipping date when all moves are cancelled issue11258 review366751002 diffstat: sale.py | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diffs (17 lines): diff -r a6b936440fd1 -r 3bfef79b48cb sale.py --- a/sale.py Tue Feb 15 00:08:47 2022 +0100 +++ b/sale.py Fri Feb 18 09:34:30 2022 +0100 @@ -1437,10 +1437,10 @@ @fields.depends('moves', methods=['planned_shipping_date']) def on_change_with_shipping_date(self, name=None): -if self.moves: +moves = [m for m in self.moves if m.state != 'cancelled'] +if moves: dates = filter( -None, (m.effective_date or m.planned_date for m in self.moves -if m.state != 'cancelled')) +None, (m.effective_date or m.planned_date for m in moves)) return min(dates, default=None) return self.planned_shipping_date
[tryton-commits] changeset in modules/web_shop_shopify:6.2 Ignore subdivision wit...
changeset 34ddf82ded53 in modules/web_shop_shopify:6.2 details: https://hg.tryton.org/modules/web_shop_shopify?cmd=changeset=34ddf82ded53 description: Ignore subdivision with non valid type issue11201 review381901002 (grafted from 240c671c6be761788b7357eac42fd75fdb8a1e9f) diffstat: party.py | 13 + 1 files changed, 9 insertions(+), 4 deletions(-) diffs (30 lines): diff -r 3f6bacdd465a -r 34ddf82ded53 party.py --- a/party.py Sat Jan 15 16:22:57 2022 +0100 +++ b/party.py Mon Feb 07 22:41:11 2022 +0100 @@ -59,6 +59,7 @@ pool = Pool() Country = pool.get('country.country') Subdivision = pool.get('country.subdivision') +SubdivisionType = pool.get('party.address.subdivision_type') values = {} values['party_name'] = remove_forbidden_chars(address.name or '') @@ -75,10 +76,14 @@ if address.province_code: subdivision_code = '-'.join( [address.country_code, address.province_code]) -subdivisions = Subdivision.search([ -('country', '=', country.id), -('code', 'like', subdivision_code + '%'), -], limit=1) +subdivision_domain = [ +('country', '=', country.id), +('code', 'like', subdivision_code + '%'), +] +types = SubdivisionType.get_types(country) +if types: +subdivision_domain.append(('type', 'in', types)) +subdivisions = Subdivision.search(subdivision_domain, limit=1) if subdivisions: subdivision, = subdivisions values['subdivision'] = subdivision.id
[tryton-commits] changeset in modules/purchase_request_quotation:5.0 Split line d...
changeset c195d7b786aa in modules/purchase_request_quotation:5.0 details: https://hg.tryton.org/modules/purchase_request_quotation?cmd=changeset=c195d7b786aa description: Split line description only if not None issue11174 review397151006 (grafted from 8183563ea789ac1b01b965819feb16118bea22ec) diffstat: quotation.fodt | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diffs (15 lines): diff -r d687186309d0 -r c195d7b786aa quotation.fodt --- a/quotation.fodtThu Jun 17 22:03:34 2021 +0200 +++ b/quotation.fodtTue Jan 25 10:01:02 2022 +0100 @@ -633,9 +633,11 @@ + if test=quotation_line.description for each=description in quotation_line.description.split(\n) description /for + /if (format_number(quotation_line.quantity, quotation.supplier.lang, digits=quotation_line.unit_digits) + (quotation_line.unit and ( + quotation_line.unit.symbol) or )) or
[tryton-commits] changeset in modules/purchase_request_quotation:6.0 Split line d...
changeset 51e7d0c28a45 in modules/purchase_request_quotation:6.0 details: https://hg.tryton.org/modules/purchase_request_quotation?cmd=changeset=51e7d0c28a45 description: Split line description only if not None issue11174 review397151006 (grafted from 8183563ea789ac1b01b965819feb16118bea22ec) diffstat: quotation.fodt | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diffs (15 lines): diff -r 29e121493ee6 -r 51e7d0c28a45 quotation.fodt --- a/quotation.fodtThu Sep 16 23:48:03 2021 +0200 +++ b/quotation.fodtTue Jan 25 10:01:02 2022 +0100 @@ -684,9 +684,11 @@ + if test=quotation_line.description for each=description in quotation_line.description.split(\n) description /for + /if (format_number(quotation_line.quantity, quotation.supplier.lang, digits=quotation_line.unit_digits) + (quotation_line.unit and ( + quotation_line.unit.symbol) or )) or
[tryton-commits] changeset in modules/purchase_request_quotation:6.2 Split line d...
changeset cf29b1165b29 in modules/purchase_request_quotation:6.2 details: https://hg.tryton.org/modules/purchase_request_quotation?cmd=changeset=cf29b1165b29 description: Split line description only if not None issue11174 review397151006 (grafted from 8183563ea789ac1b01b965819feb16118bea22ec) diffstat: quotation.fodt | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diffs (15 lines): diff -r a2aa1be46ee9 -r cf29b1165b29 quotation.fodt --- a/quotation.fodtMon Nov 01 17:30:48 2021 +0100 +++ b/quotation.fodtTue Jan 25 10:01:02 2022 +0100 @@ -684,9 +684,11 @@ + if test=quotation_line.description for each=description in quotation_line.description.split(\n) description /for + /if format_number_symbol(quotation_line.quantity, quotation.supplier.lang, quotation_line.unit, digits=quotation_line.unit.digits) if quotation_line.unit else format_number(quotation_line.quantity, quotation.supplier.lang)
[tryton-commits] changeset in modules/account_invoice:6.0 Warn all past payment t...
changeset 28f7a05bf0f8 in modules/account_invoice:6.0 details: https://hg.tryton.org/modules/account_invoice?cmd=changeset=28f7a05bf0f8 description: Warn all past payment terms at the same time issue11058 review376221002 (grafted from 02be5467be12c4fabc75e31f3977faabe8155259) diffstat: invoice.py | 22 -- 1 files changed, 12 insertions(+), 10 deletions(-) diffs (37 lines): diff -r 1d5b48634551 -r 28f7a05bf0f8 invoice.py --- a/invoice.pyFri Nov 05 00:18:37 2021 +0100 +++ b/invoice.pyTue Jan 25 23:30:35 2022 +0100 @@ -996,21 +996,23 @@ remainder_total_currency = self.total_amount.copy_sign(total) else: remainder_total_currency = 0 +past_payment_term_dates = [] for date, amount in term_lines: -if self.type == 'out' and date < today: -lang = Lang.get() -warning_key = 'invoice_payment_term_%d' % self.id -if Warning.check(warning_key): -raise InvoicePaymentTermDateWarning(warning_key, -gettext('account_invoice' -'.msg_invoice_payment_term_date_past', -invoice=self.rec_name, -date=lang.strftime(date))) - line = self._get_move_line(date, amount) if line.amount_second_currency: remainder_total_currency += line.amount_second_currency move_lines.append(line) +if self.type == 'out' and date < today: +past_payment_term_dates.append(date) +if any(past_payment_term_dates): +lang = Lang.get() +warning_key = 'invoice_payment_term_%d' % self.id +if Warning.check(warning_key): +raise InvoicePaymentTermDateWarning(warning_key, +gettext('account_invoice' +'.msg_invoice_payment_term_date_past', +invoice=self.rec_name, +date=lang.strftime(min(past_payment_term_dates if not self.currency.is_zero(remainder_total_currency): move_lines[-1].amount_second_currency -= \ remainder_total_currency
[tryton-commits] changeset in modules/account_invoice:6.2 Warn all past payment t...
changeset ca52edd2cc02 in modules/account_invoice:6.2 details: https://hg.tryton.org/modules/account_invoice?cmd=changeset=ca52edd2cc02 description: Warn all past payment terms at the same time issue11058 review376221002 (grafted from 02be5467be12c4fabc75e31f3977faabe8155259) diffstat: invoice.py | 22 -- 1 files changed, 12 insertions(+), 10 deletions(-) diffs (37 lines): diff -r 810106ec8a65 -r ca52edd2cc02 invoice.py --- a/invoice.pyWed Feb 02 23:35:20 2022 +0100 +++ b/invoice.pyTue Jan 25 23:30:35 2022 +0100 @@ -1019,21 +1019,23 @@ remainder_total_currency = self.total_amount.copy_sign(total) else: remainder_total_currency = 0 +past_payment_term_dates = [] for date, amount in term_lines: -if self.type == 'out' and date < today: -lang = Lang.get() -warning_key = Warning.format('invoice_payment_term', [self]) -if Warning.check(warning_key): -raise InvoicePaymentTermDateWarning(warning_key, -gettext('account_invoice' -'.msg_invoice_payment_term_date_past', -invoice=self.rec_name, -date=lang.strftime(date))) - line = self._get_move_line(date, amount) if line.amount_second_currency: remainder_total_currency += line.amount_second_currency move_lines.append(line) +if self.type == 'out' and date < today: +past_payment_term_dates.append(date) +if any(past_payment_term_dates): +lang = Lang.get() +warning_key = Warning.format('invoice_payment_term', [self]) +if Warning.check(warning_key): +raise InvoicePaymentTermDateWarning(warning_key, +gettext('account_invoice' +'.msg_invoice_payment_term_date_past', +invoice=self.rec_name, +date=lang.strftime(min(past_payment_term_dates if not self.currency.is_zero(remainder_total_currency): move_lines[-1].amount_second_currency -= \ remainder_total_currency
[tryton-commits] changeset in modules/web_shop_shopify:default Ignore subdivision...
changeset 240c671c6be7 in modules/web_shop_shopify:default details: https://hg.tryton.org/modules/web_shop_shopify?cmd=changeset=240c671c6be7 description: Ignore subdivision with non valid type issue11201 review381901002 diffstat: party.py | 13 + 1 files changed, 9 insertions(+), 4 deletions(-) diffs (30 lines): diff -r d1c9880969da -r 240c671c6be7 party.py --- a/party.py Thu Feb 03 22:45:21 2022 +0100 +++ b/party.py Mon Feb 07 22:41:11 2022 +0100 @@ -59,6 +59,7 @@ pool = Pool() Country = pool.get('country.country') Subdivision = pool.get('country.subdivision') +SubdivisionType = pool.get('party.address.subdivision_type') values = {} values['party_name'] = remove_forbidden_chars(address.name or '') @@ -75,10 +76,14 @@ if address.province_code: subdivision_code = '-'.join( [address.country_code, address.province_code]) -subdivisions = Subdivision.search([ -('country', '=', country.id), -('code', 'like', subdivision_code + '%'), -], limit=1) +subdivision_domain = [ +('country', '=', country.id), +('code', 'like', subdivision_code + '%'), +] +types = SubdivisionType.get_types(country) +if types: +subdivision_domain.append(('type', 'in', types)) +subdivisions = Subdivision.search(subdivision_domain, limit=1) if subdivisions: subdivision, = subdivisions values['subdivision'] = subdivision.id
[tryton-commits] changeset in modules/party:default Add autonomous city as subdiv...
changeset d7d4e042710e in modules/party:default details: https://hg.tryton.org/modules/party?cmd=changeset=d7d4e042710e description: Add autonomous city as subdivision type for Spain issue11201 review389911002 diffstat: CHANGELOG | 1 + address.xml | 2 +- 2 files changed, 2 insertions(+), 1 deletions(-) diffs (20 lines): diff -r 5052018efd6f -r d7d4e042710e CHANGELOG --- a/CHANGELOG Thu Feb 03 23:13:26 2022 +0100 +++ b/CHANGELOG Mon Feb 07 22:55:08 2022 +0100 @@ -1,3 +1,4 @@ +* Add autonomous city as subdivision type for Spain * Add support for Python 3.10 * Remove support for Python 3.6 * Use all street lines in record name of address diff -r 5052018efd6f -r d7d4e042710e address.xml --- a/address.xml Thu Feb 03 23:13:26 2022 +0100 +++ b/address.xml Mon Feb 07 22:55:08 2022 +0100 @@ -683,7 +683,7 @@ ES - +
[tryton-commits] changeset in modules/sale_complaint:default Require sequence con...
changeset e13b8b7a07b8 in modules/sale_complaint:default details: https://hg.tryton.org/modules/sale_complaint?cmd=changeset=e13b8b7a07b8 description: Require sequence configuration for complaint issue11098 review387641002 diffstat: sale.py | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diffs (21 lines): diff -r e9949e3b8ee7 -r e13b8b7a07b8 sale.py --- a/sale.py Fri Feb 04 10:17:03 2022 +0100 +++ b/sale.py Fri Feb 04 21:31:47 2022 +0100 @@ -11,7 +11,7 @@ __name__ = 'sale.configuration' complaint_sequence = fields.MultiValue(fields.Many2One( -'ir.sequence', "Complaint Sequence", +'ir.sequence', "Complaint Sequence", required=True, domain=[ ('sequence_type', '=', Id('sale_complaint', 'sequence_type_complaint')), @@ -35,7 +35,7 @@ class ConfigurationSequence(metaclass=PoolMeta): __name__ = 'sale.configuration.sequence' complaint_sequence = fields.Many2One( -'ir.sequence', "Complaint Sequence", +'ir.sequence', "Complaint Sequence", required=True, domain=[ ('sequence_type', '=', Id('sale_complaint', 'sequence_type_complaint')),
[tryton-commits] changeset in modules/account_invoice:default Warn all past payme...
changeset 02be5467be12 in modules/account_invoice:default details: https://hg.tryton.org/modules/account_invoice?cmd=changeset=02be5467be12 description: Warn all past payment terms at the same time issue11058 review376221002 diffstat: invoice.py | 22 -- 1 files changed, 12 insertions(+), 10 deletions(-) diffs (37 lines): diff -r 44c2a67ad783 -r 02be5467be12 invoice.py --- a/invoice.pySun Jan 23 12:54:56 2022 +0100 +++ b/invoice.pyTue Jan 25 23:30:35 2022 +0100 @@ -1034,21 +1034,23 @@ remainder_total_currency = self.total_amount.copy_sign(total) else: remainder_total_currency = 0 +past_payment_term_dates = [] for date, amount in term_lines: -if self.type == 'out' and date < today: -lang = Lang.get() -warning_key = Warning.format('invoice_payment_term', [self]) -if Warning.check(warning_key): -raise InvoicePaymentTermDateWarning(warning_key, -gettext('account_invoice' -'.msg_invoice_payment_term_date_past', -invoice=self.rec_name, -date=lang.strftime(date))) - line = self._get_move_line(date, amount) if line.amount_second_currency: remainder_total_currency += line.amount_second_currency move_lines.append(line) +if self.type == 'out' and date < today: +past_payment_term_dates.append(date) +if any(past_payment_term_dates): +lang = Lang.get() +warning_key = Warning.format('invoice_payment_term', [self]) +if Warning.check(warning_key): +raise InvoicePaymentTermDateWarning(warning_key, +gettext('account_invoice' +'.msg_invoice_payment_term_date_past', +invoice=self.rec_name, +date=lang.strftime(min(past_payment_term_dates if not self.currency.is_zero(remainder_total_currency): move_lines[-1].amount_second_currency -= \ remainder_total_currency
[tryton-commits] changeset in modules/purchase_request_quotation:default Split li...
changeset 8183563ea789 in modules/purchase_request_quotation:default details: https://hg.tryton.org/modules/purchase_request_quotation?cmd=changeset=8183563ea789 description: Split line description only if not None issue11174 review397151006 diffstat: quotation.fodt | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diffs (15 lines): diff -r ef54ed7fc038 -r 8183563ea789 quotation.fodt --- a/quotation.fodtSun Jan 23 12:54:56 2022 +0100 +++ b/quotation.fodtTue Jan 25 10:01:02 2022 +0100 @@ -684,9 +684,11 @@ + if test=quotation_line.description for each=description in quotation_line.description.split(\n) description /for + /if format_number_symbol(quotation_line.quantity, quotation.supplier.lang, quotation_line.unit, digits=quotation_line.unit.digits) if quotation_line.unit else format_number(quotation_line.quantity, quotation.supplier.lang)
[tryton-commits] changeset in trytond:6.0 Use normalized length of record name
changeset 846c65ac0270 in trytond:6.0 details: https://hg.tryton.org/trytond?cmd=changeset=846c65ac0270 description: Use normalized length of record name This is needed in case the client normalize the report name before storing to the filesystem. issue10986 review381471003 (grafted from 970256a66ba01885af777a2fe13052f9664ba4c1) diffstat: trytond/report/report.py | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diffs (21 lines): diff -r 8cefcbc7a0d5 -r 846c65ac0270 trytond/report/report.py --- a/trytond/report/report.py Thu Dec 16 22:12:42 2021 +0100 +++ b/trytond/report/report.py Sat Dec 18 01:37:06 2021 +0100 @@ -9,6 +9,7 @@ import subprocess import tempfile import time +import unicodedata import warnings import zipfile import operator @@ -163,7 +164,8 @@ - len(str(record_count)) - 2) for record in records[:5]: record_name = record.rec_name -name_length += len(record_name) + 1 +name_length += len( +unicodedata.normalize('NFKD', record_name)) + 1 if name_length > max_length: break names.append(record_name)
[tryton-commits] changeset in trytond:6.2 Use normalized length of record name
changeset 205b4030b93c in trytond:6.2 details: https://hg.tryton.org/trytond?cmd=changeset=205b4030b93c description: Use normalized length of record name This is needed in case the client normalize the report name before storing to the filesystem. issue10986 review381471003 (grafted from 970256a66ba01885af777a2fe13052f9664ba4c1) diffstat: trytond/report/report.py | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diffs (21 lines): diff -r 8f0eb6f2e910 -r 205b4030b93c trytond/report/report.py --- a/trytond/report/report.py Thu Dec 16 22:12:42 2021 +0100 +++ b/trytond/report/report.py Sat Dec 18 01:37:06 2021 +0100 @@ -9,6 +9,7 @@ import subprocess import tempfile import time +import unicodedata import warnings import zipfile import operator @@ -173,7 +174,8 @@ record_name = template.generate(record=record).render() else: record_name = record.rec_name -name_length += len(record_name) + 1 +name_length += len( +unicodedata.normalize('NFKD', record_name)) + 1 if name_length > max_length: break names.append(record_name)
[tryton-commits] changeset in trytond:default Use normalized length of record name
changeset 970256a66ba0 in trytond:default details: https://hg.tryton.org/trytond?cmd=changeset=970256a66ba0 description: Use normalized length of record name This is needed in case the client normalize the report name before storing to the filesystem. issue10986 review381471003 diffstat: trytond/report/report.py | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diffs (21 lines): diff -r d8ec7b7a2023 -r 970256a66ba0 trytond/report/report.py --- a/trytond/report/report.py Thu Dec 16 22:26:04 2021 +0100 +++ b/trytond/report/report.py Sat Dec 18 01:37:06 2021 +0100 @@ -9,6 +9,7 @@ import subprocess import tempfile import time +import unicodedata import warnings import zipfile from email.mime.multipart import MIMEMultipart @@ -174,7 +175,8 @@ record_name = template.generate(record=record).render() else: record_name = record.rec_name -name_length += len(record_name) + 1 +name_length += len( +unicodedata.normalize('NFKD', record_name)) + 1 if name_length > max_length: break names.append(record_name)
[tryton-commits] changeset in modules/account:default Remove amount currency on p...
changeset e95415e93117 in modules/account:default details: https://hg.tryton.org/modules/account?cmd=changeset=e95415e93117 description: Remove amount currency on payable and receivable lines The amount field already display the amount in second currency. issue10984 review372661002 diffstat: view/move_line_list_payable_receivable.xml | 1 - 1 files changed, 0 insertions(+), 1 deletions(-) diffs (11 lines): diff -r 676e4f63b495 -r e95415e93117 view/move_line_list_payable_receivable.xml --- a/view/move_line_list_payable_receivable.xmlMon Nov 01 17:05:10 2021 +0100 +++ b/view/move_line_list_payable_receivable.xmlSat Nov 27 12:36:09 2021 +0100 @@ -5,7 +5,6 @@ -
[tryton-commits] changeset in modules/web_shop_shopify:default Adapt tests to cen...
changeset 8aa28d9abafd in modules/web_shop_shopify:default details: https://hg.tryton.org/modules/web_shop_shopify?cmd=changeset=8aa28d9abafd description: Adapt tests to centimeters capitalization issue10973 review364411002 diffstat: tests/scenario_web_shop_shopify_secondary_unit.rst | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diffs (12 lines): diff -r 10a9c97e4592 -r 8aa28d9abafd tests/scenario_web_shop_shopify_secondary_unit.rst --- a/tests/scenario_web_shop_shopify_secondary_unit.rstSat Nov 20 00:14:56 2021 +0100 +++ b/tests/scenario_web_shop_shopify_secondary_unit.rstTue Nov 23 14:41:20 2021 +0100 @@ -114,7 +114,7 @@ >>> unit.digits = 2 >>> unit.rounding = 0.01 >>> unit.save() ->>> cm, = Uom.find([('name', '=', "centimeter")]) +>>> cm, = Uom.find([('name', '=', "Centimeter")]) >>> cm.digits = 0 >>> cm.rounding = 1 >>> cm.save()
[tryton-commits] changeset in modules/stock_product_location:default Adapt tests ...
changeset a5e16d9b0e3c in modules/stock_product_location:default details: https://hg.tryton.org/modules/stock_product_location?cmd=changeset=a5e16d9b0e3c description: Adapt tests to centimeters capitalization issue10973 review364411002 diffstat: tests/scenario_stock_product_location_production.rst | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diffs (12 lines): diff -r a8d6b50b3ebb -r a5e16d9b0e3c tests/scenario_stock_product_location_production.rst --- a/tests/scenario_stock_product_location_production.rst Mon Nov 01 17:15:31 2021 +0100 +++ b/tests/scenario_stock_product_location_production.rst Tue Nov 23 14:41:20 2021 +0100 @@ -64,7 +64,7 @@ >>> component1, = template1.products >>> meter, = ProductUom.find([('name', '=', 'Meter')]) ->>> centimeter, = ProductUom.find([('name', '=', 'centimeter')]) +>>> centimeter, = ProductUom.find([('name', '=', 'Centimeter')]) >>> template2 = ProductTemplate() >>> template2.name = 'component 2' >>> template2.default_uom = meter
[tryton-commits] changeset in modules/production:default Adapt tests to centimete...
changeset 0e46adaa68fb in modules/production:default details: https://hg.tryton.org/modules/production?cmd=changeset=0e46adaa68fb description: Adapt tests to centimeters capitalization issue10973 review364411002 diffstat: tests/scenario_production.rst | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diffs (12 lines): diff -r 8f0ad3669cf3 -r 0e46adaa68fb tests/scenario_production.rst --- a/tests/scenario_production.rst Mon Nov 01 17:11:13 2021 +0100 +++ b/tests/scenario_production.rst Tue Nov 23 14:41:20 2021 +0100 @@ -56,7 +56,7 @@ >>> component1, = template1.products >>> meter, = ProductUom.find([('name', '=', 'Meter')]) ->>> centimeter, = ProductUom.find([('name', '=', 'centimeter')]) +>>> centimeter, = ProductUom.find([('name', '=', 'Centimeter')]) >>> template2 = ProductTemplate() >>> template2.name = 'component 2'
[tryton-commits] changeset in modules/product:default Adapt tests to centimeters ...
changeset 5a86943d5476 in modules/product:default details: https://hg.tryton.org/modules/product?cmd=changeset=5a86943d5476 description: Adapt tests to centimeters capitalization issue10973 review364411002 diffstat: tests/test_product.py | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diffs (12 lines): diff -r efadeef960bb -r 5a86943d5476 tests/test_product.py --- a/tests/test_product.py Tue Nov 23 11:55:57 2021 +0100 +++ b/tests/test_product.py Tue Nov 23 14:41:20 2021 +0100 @@ -114,7 +114,7 @@ tests = [ ('Meter', 'factor'), ('Kilometer', 'factor'), -('centimeter', 'rate'), +('Centimeter', 'rate'), ('Foot', 'factor'), ] for name, result in tests:
[tryton-commits] changeset in modules/product:default Capitalize first letter of ...
changeset efadeef960bb in modules/product:default details: https://hg.tryton.org/modules/product?cmd=changeset=efadeef960bb description: Capitalize first letter of centimeter issue10971 review372631002 diffstat: uom.xml | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diffs (12 lines): diff -r a8acc44e59f4 -r efadeef960bb uom.xml --- a/uom.xml Mon Nov 01 17:05:59 2021 +0100 +++ b/uom.xml Tue Nov 23 11:55:57 2021 +0100 @@ -175,7 +175,7 @@ -centimeter +Centimeter cm
[tryton-commits] changeset in trytond:6.0 Include action report name on report na...
changeset 7c28ddc99210 in trytond:6.0 details: https://hg.tryton.org/trytond?cmd=changeset=7c28ddc99210 description: Include action report name on report name max length issue10946 review374151002 (grafted from 90517aa1addf77b9a1d8ac5cb65506f7828d6b11) diffstat: trytond/report/report.py | 20 ++-- 1 files changed, 14 insertions(+), 6 deletions(-) diffs (55 lines): diff -r 812c69084e51 -r 7c28ddc99210 trytond/report/report.py --- a/trytond/report/report.py Fri Nov 05 00:01:42 2021 +0100 +++ b/trytond/report/report.py Sat Nov 13 01:38:59 2021 +0100 @@ -154,11 +154,13 @@ else: action_report = ActionReport(action_id) -def report_name(records): +def report_name(records, reserved_length=0): names = [] name_length = 0 record_count = len(records) -max_length = REPORT_NAME_MAX_LENGTH - len(str(record_count)) - 2 +max_length = (REPORT_NAME_MAX_LENGTH +- reserved_length +- len(str(record_count)) - 2) for record in records[:5]: record_name = record.rec_name name_length += len(record_name) + 1 @@ -190,6 +192,7 @@ headers.append(dict(key)) n = len(groups) +join_string = '-' if n > 1: padding = math.ceil(math.log10(n)) content = BytesIO() @@ -198,9 +201,10 @@ zip(headers, groups), 1): oext, rcontent = cls._execute( group_records, header, data, action_report) -filename = report_name(group_records) number = str(i).zfill(padding) -filename = slugify('%s-%s' % (number, filename)) +filename = report_name( +group_records, len(number) + len(join_string)) +filename = slugify(join_string.join([number, filename])) rfilename = '%s.%s' % (filename, oext) content_zip.writestr(rfilename, rcontent) content = content.getvalue() @@ -210,8 +214,12 @@ groups[0], headers[0], data, action_report) if not isinstance(content, str): content = bytearray(content) if bytes == str else bytes(content) -filename = '-'.join( -filter(None, [action_report.name, report_name(records)])) +action_report_name = action_report.name[:REPORT_NAME_MAX_LENGTH] +filename = join_string.join( +filter(None, [ +action_report_name, +report_name( +records, len(action_report_name) + len(join_string))])) return (oext, content, action_report.direct_print, filename) @classmethod
[tryton-commits] changeset in trytond:6.2 Include action report name on report na...
changeset 3925b109f1a4 in trytond:6.2 details: https://hg.tryton.org/trytond?cmd=changeset=3925b109f1a4 description: Include action report name on report name max length issue10946 review374151002 (grafted from 90517aa1addf77b9a1d8ac5cb65506f7828d6b11) diffstat: trytond/report/report.py | 22 +++--- 1 files changed, 15 insertions(+), 7 deletions(-) diffs (59 lines): diff -r 63897357cc7d -r 3925b109f1a4 trytond/report/report.py --- a/trytond/report/report.py Mon Nov 01 16:57:57 2021 +0100 +++ b/trytond/report/report.py Sat Nov 13 01:38:59 2021 +0100 @@ -157,11 +157,13 @@ else: action_report = ActionReport(action_id) -def report_name(records): +def report_name(records, reserved_length=0): names = [] name_length = 0 record_count = len(records) -max_length = REPORT_NAME_MAX_LENGTH - len(str(record_count)) - 2 +max_length = (REPORT_NAME_MAX_LENGTH +- reserved_length +- len(str(record_count)) - 2) if action_report.record_name: template = TextTemplate(action_report.record_name) else: @@ -200,6 +202,7 @@ headers.append(dict(key)) n = len(groups) +join_string = '-' if n > 1: padding = math.ceil(math.log10(n)) content = BytesIO() @@ -208,9 +211,10 @@ zip(headers, groups), 1): oext, rcontent = cls._execute( group_records, header, data, action_report) -filename = report_name(group_records) number = str(i).zfill(padding) -filename = slugify('%s-%s' % (number, filename)) +filename = report_name( +group_records, len(number) + len(join_string)) +filename = slugify(join_string.join([number, filename])) rfilename = '%s.%s' % (filename, oext) content_zip.writestr(rfilename, rcontent) content = content.getvalue() @@ -220,11 +224,15 @@ groups[0], headers[0], data, action_report) if not isinstance(content, str): content = bytearray(content) if bytes == str else bytes(content) +action_report_name = action_report.name[:REPORT_NAME_MAX_LENGTH] if context.get('with_rec_name', True): -filename = '-'.join( -filter(None, [action_report.name, report_name(records)])) +filename = join_string.join( +filter(None, [ +action_report_name, +report_name( +records, len(action_report_name) + len(join_string))])) else: -filename = action_report.name +filename = action_report_name return (oext, content, action_report.direct_print, filename) @classmethod
[tryton-commits] changeset in trytond:default Include action report name on repor...
changeset 90517aa1addf in trytond:default details: https://hg.tryton.org/trytond?cmd=changeset=90517aa1addf description: Include action report name on report name max length issue10946 review374151002 diffstat: trytond/report/report.py | 22 +++--- 1 files changed, 15 insertions(+), 7 deletions(-) diffs (59 lines): diff -r 6afb4a26f82d -r 90517aa1addf trytond/report/report.py --- a/trytond/report/report.py Mon Nov 08 22:52:40 2021 +0100 +++ b/trytond/report/report.py Sat Nov 13 01:38:59 2021 +0100 @@ -157,11 +157,13 @@ else: action_report = ActionReport(action_id) -def report_name(records): +def report_name(records, reserved_length=0): names = [] name_length = 0 record_count = len(records) -max_length = REPORT_NAME_MAX_LENGTH - len(str(record_count)) - 2 +max_length = (REPORT_NAME_MAX_LENGTH +- reserved_length +- len(str(record_count)) - 2) if action_report.record_name: template = TextTemplate(action_report.record_name) else: @@ -200,6 +202,7 @@ headers.append(dict(key)) n = len(groups) +join_string = '-' if n > 1: padding = math.ceil(math.log10(n)) content = BytesIO() @@ -208,9 +211,10 @@ zip(headers, groups), 1): oext, rcontent = cls._execute( group_records, header, data, action_report) -filename = report_name(group_records) number = str(i).zfill(padding) -filename = slugify('%s-%s' % (number, filename)) +filename = report_name( +group_records, len(number) + len(join_string)) +filename = slugify(join_string.join([number, filename])) rfilename = '%s.%s' % (filename, oext) content_zip.writestr(rfilename, rcontent) content = content.getvalue() @@ -220,11 +224,15 @@ groups[0], headers[0], data, action_report) if not isinstance(content, str): content = bytearray(content) if bytes == str else bytes(content) +action_report_name = action_report.name[:REPORT_NAME_MAX_LENGTH] if context.get('with_rec_name', True): -filename = '-'.join( -filter(None, [action_report.name, report_name(records)])) +filename = join_string.join( +filter(None, [ +action_report_name, +report_name( +records, len(action_report_name) + len(join_string))])) else: -filename = action_report.name +filename = action_report_name return (oext, content, action_report.direct_print, filename) @classmethod
[tryton-commits] changeset in modules/stock:5.0 Manage multiple arguments on inve...
changeset 5fef2ffe94be in modules/stock:5.0 details: https://hg.tryton.org/modules/stock?cmd=changeset=5fef2ffe94be description: Manage multiple arguments on inventory write issue10894 review362981002 (grafted from 49b5584941203954a801791234de83a3090ce6cb) diffstat: inventory.py | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) diffs (15 lines): diff -r 6f66713b06ab -r 5fef2ffe94be inventory.py --- a/inventory.py Thu Aug 05 23:47:27 2021 +0200 +++ b/inventory.py Fri Oct 22 15:47:33 2021 +0200 @@ -176,8 +176,9 @@ return inventories @classmethod -def write(cls, inventories, values): -super(Inventory, cls).write(inventories, values) +def write(cls, *args): +super().write(*args) +inventories = cls.browse(set(sum(args[::2], []))) cls.complete_lines(inventories, fill=False) @classmethod
[tryton-commits] changeset in modules/stock:5.8 Manage multiple arguments on inve...
changeset 77e1f646fdf9 in modules/stock:5.8 details: https://hg.tryton.org/modules/stock?cmd=changeset=77e1f646fdf9 description: Manage multiple arguments on inventory write issue10894 review362981002 (grafted from 49b5584941203954a801791234de83a3090ce6cb) diffstat: inventory.py | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) diffs (15 lines): diff -r f71af880465b -r 77e1f646fdf9 inventory.py --- a/inventory.py Thu Oct 21 00:07:14 2021 +0200 +++ b/inventory.py Fri Oct 22 15:47:33 2021 +0200 @@ -217,8 +217,9 @@ return inventories @classmethod -def write(cls, inventories, values): -super(Inventory, cls).write(inventories, values) +def write(cls, *args): +super().write(*args) +inventories = cls.browse(set(sum(args[::2], []))) cls.complete_lines(inventories, fill=False) @classmethod
[tryton-commits] changeset in modules/stock:6.0 Manage multiple arguments on inve...
changeset b03277e97bc4 in modules/stock:6.0 details: https://hg.tryton.org/modules/stock?cmd=changeset=b03277e97bc4 description: Manage multiple arguments on inventory write issue10894 review362981002 (grafted from 49b5584941203954a801791234de83a3090ce6cb) diffstat: inventory.py | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) diffs (15 lines): diff -r 35684f30c14a -r b03277e97bc4 inventory.py --- a/inventory.py Thu Oct 21 00:07:14 2021 +0200 +++ b/inventory.py Fri Oct 22 15:47:33 2021 +0200 @@ -218,8 +218,9 @@ return inventories @classmethod -def write(cls, inventories, values): -super(Inventory, cls).write(inventories, values) +def write(cls, *args): +super().write(*args) +inventories = cls.browse(set(sum(args[::2], []))) cls.complete_lines(inventories, fill=False) @classmethod
[tryton-commits] changeset in modules/stock:5.8 Do not modify iterated list to no...
changeset f71af880465b in modules/stock:5.8 details: https://hg.tryton.org/modules/stock?cmd=changeset=f71af880465b description: Do not modify iterated list to not miss product issue10872 review372361002 (grafted from cba100c1c8ab41a4dec96048f21b554b0529b82e) diffstat: product.py | 8 1 files changed, 4 insertions(+), 4 deletions(-) diffs (25 lines): diff -r d32e2e8c11e8 -r f71af880465b product.py --- a/product.pyWed Sep 01 22:54:25 2021 +0200 +++ b/product.pyThu Oct 21 00:07:14 2021 +0200 @@ -862,8 +862,8 @@ revisions = [] costs = defaultdict(list) if self.model.__name__ == 'product.product': -products = records = list(self.records) -for product in products: +records = list(self.records) +for product in list(records): revision = self.get_revision(Revision) revision.product = product revision.template = product.template @@ -876,8 +876,8 @@ costs[cost].append(product) records.remove(product) elif self.model.__name__ == 'product.template': -templates = records = list(self.records) -for template in templates: +records = list(self.records) +for template in list(records): revision = self.get_revision(Revision) revision.template = template revisions.append(revision)
[tryton-commits] changeset in modules/stock:6.0 Do not modify iterated list to no...
changeset 35684f30c14a in modules/stock:6.0 details: https://hg.tryton.org/modules/stock?cmd=changeset=35684f30c14a description: Do not modify iterated list to not miss product issue10872 review372361002 (grafted from cba100c1c8ab41a4dec96048f21b554b0529b82e) diffstat: product.py | 8 1 files changed, 4 insertions(+), 4 deletions(-) diffs (25 lines): diff -r ef20d6d41683 -r 35684f30c14a product.py --- a/product.pyFri Oct 15 19:16:47 2021 +0200 +++ b/product.pyThu Oct 21 00:07:14 2021 +0200 @@ -1042,8 +1042,8 @@ revisions = [] costs = defaultdict(list) if self.model.__name__ == 'product.product': -products = records = list(self.records) -for product in products: +records = list(self.records) +for product in list(records): revision = self.get_revision(Revision) revision.product = product revision.template = product.template @@ -1056,8 +1056,8 @@ costs[cost].append(product) records.remove(product) elif self.model.__name__ == 'product.template': -templates = records = list(self.records) -for template in templates: +records = list(self.records) +for template in list(records): revision = self.get_revision(Revision) revision.template = template revisions.append(revision)
[tryton-commits] changeset in modules/sale_supply_drop_shipment:5.0 Process sales...
changeset 5f2b47f74265 in modules/sale_supply_drop_shipment:5.0 details: https://hg.tryton.org/modules/sale_supply_drop_shipment?cmd=changeset=5f2b47f74265 description: Process sales on ship This ensures partial shipments are properly linked to sales. issue10430 review361921002 (grafted from 20b2886e3f89b38f30f9a4e2a5be47ff039db465) diffstat: stock.py | 1 + tests/scenario_sale_supply_drop_shipment.rst | 9 - 2 files changed, 9 insertions(+), 1 deletions(-) diffs (44 lines): diff -r 9945d9f77ca5 -r 5f2b47f74265 stock.py --- a/stock.py Thu Jun 17 22:08:35 2021 +0200 +++ b/stock.py Fri Oct 22 10:15:48 2021 +0200 @@ -546,6 +546,7 @@ @classmethod @ModelView.button @Workflow.transition('shipped') +@process_sale('customer_moves') @process_purchase('supplier_moves') def ship(cls, shipments): pool = Pool() diff -r 9945d9f77ca5 -r 5f2b47f74265 tests/scenario_sale_supply_drop_shipment.rst --- a/tests/scenario_sale_supply_drop_shipment.rst Thu Jun 17 22:08:35 2021 +0200 +++ b/tests/scenario_sale_supply_drop_shipment.rst Fri Oct 22 10:15:48 2021 +0200 @@ -200,7 +200,10 @@ >>> sale.reload() >>> sale.shipments [] ->>> shipment, = sale.drop_shipments +>>> len(sale.drop_shipments) +2 +>>> shipment, = [s for s in sale.drop_shipments +... if s.state == 'shipped'] >>> set_user(stock_user) >>> shipment.click('done') @@ -210,6 +213,8 @@ >>> sale.reload() >>> sale.shipments [] +>>> len(sale.drop_shipments) +2 The purchase is now waiting for his new drop shipment:: @@ -217,6 +222,8 @@ >>> purchase.reload() >>> purchase.shipment_state 'waiting' +>>> len(purchase.drop_shipments) +2 >>> shipment, = [s for s in purchase.drop_shipments ... if s.state == 'waiting'] >>> move, = shipment.customer_moves
[tryton-commits] changeset in modules/sale_supply_drop_shipment:5.8 Process sales...
changeset 16401f4edbfc in modules/sale_supply_drop_shipment:5.8 details: https://hg.tryton.org/modules/sale_supply_drop_shipment?cmd=changeset=16401f4edbfc description: Process sales on ship This ensures partial shipments are properly linked to sales. issue10430 review361921002 (grafted from 20b2886e3f89b38f30f9a4e2a5be47ff039db465) diffstat: stock.py | 1 + tests/scenario_sale_supply_drop_shipment.rst | 9 - 2 files changed, 9 insertions(+), 1 deletions(-) diffs (44 lines): diff -r e3b78bceb317 -r 16401f4edbfc stock.py --- a/stock.py Fri Jan 01 16:38:56 2021 +0100 +++ b/stock.py Fri Oct 22 10:15:48 2021 +0200 @@ -540,6 +540,7 @@ @classmethod @ModelView.button @Workflow.transition('shipped') +@process_sale('customer_moves') @process_purchase('supplier_moves') def ship(cls, shipments): pool = Pool() diff -r e3b78bceb317 -r 16401f4edbfc tests/scenario_sale_supply_drop_shipment.rst --- a/tests/scenario_sale_supply_drop_shipment.rst Fri Jan 01 16:38:56 2021 +0100 +++ b/tests/scenario_sale_supply_drop_shipment.rst Fri Oct 22 10:15:48 2021 +0200 @@ -198,7 +198,10 @@ >>> sale.reload() >>> sale.shipments [] ->>> shipment, = sale.drop_shipments +>>> len(sale.drop_shipments) +2 +>>> shipment, = [s for s in sale.drop_shipments +... if s.state == 'shipped'] >>> set_user(stock_user) >>> shipment.click('done') @@ -208,6 +211,8 @@ >>> sale.reload() >>> sale.shipments [] +>>> len(sale.drop_shipments) +2 The purchase is now waiting for his new drop shipment:: @@ -215,6 +220,8 @@ >>> purchase.reload() >>> purchase.shipment_state 'waiting' +>>> len(purchase.drop_shipments) +2 >>> shipment, = [s for s in purchase.drop_shipments ... if s.state == 'waiting'] >>> move, = shipment.customer_moves
[tryton-commits] changeset in modules/sale_supply_drop_shipment:6.0 Process sales...
changeset e779cfdf0951 in modules/sale_supply_drop_shipment:6.0 details: https://hg.tryton.org/modules/sale_supply_drop_shipment?cmd=changeset=e779cfdf0951 description: Process sales on ship This ensures partial shipments are properly linked to sales. issue10430 review361921002 (grafted from 20b2886e3f89b38f30f9a4e2a5be47ff039db465) diffstat: stock.py | 1 + tests/scenario_sale_supply_drop_shipment.rst | 9 - 2 files changed, 9 insertions(+), 1 deletions(-) diffs (44 lines): diff -r 7518a40c048d -r e779cfdf0951 stock.py --- a/stock.py Fri Oct 15 17:23:56 2021 +0200 +++ b/stock.py Fri Oct 22 10:15:48 2021 +0200 @@ -573,6 +573,7 @@ @classmethod @ModelView.button @Workflow.transition('shipped') +@process_sale('customer_moves') @process_purchase('supplier_moves') def ship(cls, shipments): pool = Pool() diff -r 7518a40c048d -r e779cfdf0951 tests/scenario_sale_supply_drop_shipment.rst --- a/tests/scenario_sale_supply_drop_shipment.rst Fri Oct 15 17:23:56 2021 +0200 +++ b/tests/scenario_sale_supply_drop_shipment.rst Fri Oct 22 10:15:48 2021 +0200 @@ -195,7 +195,10 @@ >>> sale.reload() >>> sale.shipments [] ->>> shipment, = sale.drop_shipments +>>> len(sale.drop_shipments) +2 +>>> shipment, = [s for s in sale.drop_shipments +... if s.state == 'shipped'] >>> set_user(stock_user) >>> shipment.click('done') @@ -205,6 +208,8 @@ >>> sale.reload() >>> sale.shipments [] +>>> len(sale.drop_shipments) +2 The purchase is now waiting for his new drop shipment:: @@ -212,6 +217,8 @@ >>> purchase.reload() >>> purchase.shipment_state 'waiting' +>>> len(purchase.drop_shipments) +2 >>> shipment, = [s for s in purchase.drop_shipments ... if s.state == 'waiting'] >>> move, = shipment.customer_moves
[tryton-commits] changeset in trytond:5.8 Add missing new lines on docs
changeset 406b95a3ae8d in trytond:5.8 details: https://hg.tryton.org/trytond?cmd=changeset=406b95a3ae8d description: Add missing new lines on docs issue10887 review387211002 (grafted from 71e538c0e6ea1f94198927715e0da1d25e908fa5) diffstat: doc/ref/models/models.rst | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diffs (20 lines): diff -r 41ac6c023d71 -r 406b95a3ae8d doc/ref/models/models.rst --- a/doc/ref/models/models.rst Tue Oct 19 00:22:08 2021 +0200 +++ b/doc/ref/models/models.rst Wed Oct 20 15:16:10 2021 +0200 @@ -37,13 +37,16 @@ into the queue. .. attribute:: Model._fields + It contains a dictionary with the field name as key and its :class:`~trytond.model.field` instance as value. .. attribute:: Model._record + It stores the record class to store internaly the values of the instances. .. attribute:: Model._defaults + It contains a dictionary with the field name as key and its default method as value.
[tryton-commits] changeset in trytond:6.0 Add missing new lines on docs
changeset b02d8774b6e9 in trytond:6.0 details: https://hg.tryton.org/trytond?cmd=changeset=b02d8774b6e9 description: Add missing new lines on docs issue10887 review387211002 (grafted from 71e538c0e6ea1f94198927715e0da1d25e908fa5) diffstat: doc/ref/models/models.rst | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diffs (20 lines): diff -r eb37e31d8eda -r b02d8774b6e9 doc/ref/models/models.rst --- a/doc/ref/models/models.rst Tue Oct 19 00:22:08 2021 +0200 +++ b/doc/ref/models/models.rst Wed Oct 20 15:16:10 2021 +0200 @@ -42,13 +42,16 @@ into the queue. .. attribute:: Model._fields + It contains a dictionary with the field name as key and its :class:`~trytond.model.field` instance as value. .. attribute:: Model._record + It stores the record class to store internaly the values of the instances. .. attribute:: Model._defaults + It contains a dictionary with the field name as key and its default method as value.
[tryton-commits] changeset in modules/notification_email:5.8 Do not migrate log i...
changeset daa23021a482 in modules/notification_email:5.8 details: https://hg.tryton.org/modules/notification_email?cmd=changeset=daa23021a482 description: Do not migrate log if it has resource issue10855 review364201002 (grafted from 789a2cf4007744330cfe70cfe81a9eb2d9750e96) diffstat: notification.py | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diffs (12 lines): diff -r 4e541f0511ca -r daa23021a482 notification.py --- a/notification.py Wed Sep 01 22:57:57 2021 +0200 +++ b/notification.py Wed Oct 13 18:27:52 2021 +0200 @@ -385,7 +385,7 @@ cursor.execute(*table.update( [table.notification, table.resource], [notification, resource], -where=table.trigger != Null)) +where=(table.trigger != Null) & (table.resource == Null))) table_h.not_null_action('trigger', 'remove') def get_date(self, name):
[tryton-commits] changeset in modules/notification_email:6.0 Do not migrate log i...
changeset 40cd7f9613a2 in modules/notification_email:6.0 details: https://hg.tryton.org/modules/notification_email?cmd=changeset=40cd7f9613a2 description: Do not migrate log if it has resource issue10855 review364201002 (grafted from 789a2cf4007744330cfe70cfe81a9eb2d9750e96) diffstat: notification.py | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diffs (12 lines): diff -r 537105bf9880 -r 40cd7f9613a2 notification.py --- a/notification.py Wed Sep 01 22:57:36 2021 +0200 +++ b/notification.py Wed Oct 13 18:27:52 2021 +0200 @@ -389,7 +389,7 @@ cursor.execute(*table.update( [table.notification, table.resource], [notification, resource], -where=table.trigger != Null)) +where=(table.trigger != Null) & (table.resource == Null))) table_h.not_null_action('trigger', 'remove') def get_date(self, name):
[tryton-commits] changeset in modules/stock:default Manage multiple arguments on ...
changeset 49b558494120 in modules/stock:default details: https://hg.tryton.org/modules/stock?cmd=changeset=49b558494120 description: Manage multiple arguments on inventory write issue10894 review362981002 diffstat: inventory.py | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) diffs (15 lines): diff -r cba100c1c8ab -r 49b558494120 inventory.py --- a/inventory.py Thu Oct 21 00:07:14 2021 +0200 +++ b/inventory.py Fri Oct 22 15:47:33 2021 +0200 @@ -214,8 +214,9 @@ return inventories @classmethod -def write(cls, inventories, values): -super(Inventory, cls).write(inventories, values) +def write(cls, *args): +super().write(*args) +inventories = cls.browse(set(sum(args[::2], []))) cls.complete_lines(inventories, fill=False) @classmethod
[tryton-commits] changeset in modules/sale_supply_drop_shipment:default Process s...
changeset 20b2886e3f89 in modules/sale_supply_drop_shipment:default details: https://hg.tryton.org/modules/sale_supply_drop_shipment?cmd=changeset=20b2886e3f89 description: Process sales on ship This ensures partial shipments are properly linked to sales. issue10430 review361921002 diffstat: stock.py | 1 + tests/scenario_sale_supply_drop_shipment.rst | 9 - 2 files changed, 9 insertions(+), 1 deletions(-) diffs (44 lines): diff -r cbf861fec31e -r 20b2886e3f89 stock.py --- a/stock.py Fri Oct 08 19:21:06 2021 +0200 +++ b/stock.py Fri Oct 22 10:15:48 2021 +0200 @@ -573,6 +573,7 @@ @classmethod @ModelView.button @Workflow.transition('shipped') +@process_sale('customer_moves') @process_purchase('supplier_moves') def ship(cls, shipments): pool = Pool() diff -r cbf861fec31e -r 20b2886e3f89 tests/scenario_sale_supply_drop_shipment.rst --- a/tests/scenario_sale_supply_drop_shipment.rst Fri Oct 08 19:21:06 2021 +0200 +++ b/tests/scenario_sale_supply_drop_shipment.rst Fri Oct 22 10:15:48 2021 +0200 @@ -195,7 +195,10 @@ >>> sale.reload() >>> sale.shipments [] ->>> shipment, = sale.drop_shipments +>>> len(sale.drop_shipments) +2 +>>> shipment, = [s for s in sale.drop_shipments +... if s.state == 'shipped'] >>> set_user(stock_user) >>> shipment.click('done') @@ -205,6 +208,8 @@ >>> sale.reload() >>> sale.shipments [] +>>> len(sale.drop_shipments) +2 The purchase is now waiting for his new drop shipment:: @@ -212,6 +217,8 @@ >>> purchase.reload() >>> purchase.shipment_state 'waiting' +>>> len(purchase.drop_shipments) +2 >>> shipment, = [s for s in purchase.drop_shipments ... if s.state == 'waiting'] >>> move, = shipment.customer_moves
[tryton-commits] changeset in modules/stock:default Do not modify iterated list t...
changeset cba100c1c8ab in modules/stock:default details: https://hg.tryton.org/modules/stock?cmd=changeset=cba100c1c8ab description: Do not modify iterated list to not miss product issue10872 review372361002 diffstat: product.py | 8 1 files changed, 4 insertions(+), 4 deletions(-) diffs (25 lines): diff -r cea1542cb019 -r cba100c1c8ab product.py --- a/product.pyMon Oct 18 01:22:26 2021 +0200 +++ b/product.pyThu Oct 21 00:07:14 2021 +0200 @@ -1042,8 +1042,8 @@ revisions = [] costs = defaultdict(list) if self.model.__name__ == 'product.product': -products = records = list(self.records) -for product in products: +records = list(self.records) +for product in list(records): revision = self.get_revision(Revision) revision.product = product revision.template = product.template @@ -1056,8 +1056,8 @@ costs[cost].append(product) records.remove(product) elif self.model.__name__ == 'product.template': -templates = records = list(self.records) -for template in templates: +records = list(self.records) +for template in list(records): revision = self.get_revision(Revision) revision.template = template revisions.append(revision)
[tryton-commits] changeset in trytond:default Add missing new lines on docs
changeset 71e538c0e6ea in trytond:default details: https://hg.tryton.org/trytond?cmd=changeset=71e538c0e6ea description: Add missing new lines on docs issue10887 review387211002 diffstat: doc/ref/models/models.rst | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diffs (20 lines): diff -r 7166741cf718 -r 71e538c0e6ea doc/ref/models/models.rst --- a/doc/ref/models/models.rst Tue Oct 19 00:22:08 2021 +0200 +++ b/doc/ref/models/models.rst Wed Oct 20 15:16:10 2021 +0200 @@ -42,13 +42,16 @@ into the queue. .. attribute:: Model._fields + It contains a dictionary with the field name as key and its :class:`~trytond.model.field` instance as value. .. attribute:: Model._record + It stores the record class to store internaly the values of the instances. .. attribute:: Model._defaults + It contains a dictionary with the field name as key and its default method as value.
[tryton-commits] changeset in modules/notification_email:default Do not migrate l...
changeset 789a2cf40077 in modules/notification_email:default details: https://hg.tryton.org/modules/notification_email?cmd=changeset=789a2cf40077 description: Do not migrate log if it has resource issue10855 review364201002 diffstat: notification.py | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diffs (12 lines): diff -r 267cc29073b7 -r 789a2cf40077 notification.py --- a/notification.py Sun Sep 26 23:11:21 2021 +0200 +++ b/notification.py Wed Oct 13 18:27:52 2021 +0200 @@ -403,7 +403,7 @@ cursor.execute(*table.update( [table.notification, table.resource], [notification, resource], -where=table.trigger != Null)) +where=(table.trigger != Null) & (table.resource == Null))) table_h.not_null_action('trigger', 'remove') def get_date(self, name):
[tryton-commits] changeset in modules/sale:default Only require shipment_address ...
changeset c25eeed6f1b3 in modules/sale:default details: https://hg.tryton.org/modules/sale?cmd=changeset=c25eeed6f1b3 description: Only require shipment_address for not services products issue10692 review360021002 diffstat: sale.py | 13 ++--- 1 files changed, 6 insertions(+), 7 deletions(-) diffs (31 lines): diff -r dd06c21bc0a6 -r c25eeed6f1b3 sale.py --- a/sale.py Mon Oct 11 22:40:54 2021 +0200 +++ b/sale.py Tue Oct 12 10:28:17 2021 +0200 @@ -158,8 +158,6 @@ ], states={ 'readonly': Eval('state') != 'draft', -'required': ~Eval('state').in_( -['draft', 'quotation', 'cancelled']), }, depends=['party', 'shipment_party', 'state']) warehouse = fields.Many2One('stock.location', 'Warehouse', @@ -720,12 +718,13 @@ raise SaleQuotationError( gettext('sale.msg_sale_invoice_address_required_for_quotation', sale=self.rec_name)) -if not self.shipment_address: -raise SaleQuotationError( -gettext('sale' -'.msg_sale_shipment_address_required_for_quotation', -sale=self.rec_name)) for line in self.lines: +if (line.product and line.product.type != 'service' +and not self.shipment_address): +raise SaleQuotationError( +gettext('sale' +'.msg_sale_shipment_address_required_for_quotation', +sale=self.rec_name)) if (line.quantity or 0) >= 0: location = line.from_location else: