update patches to current default

This commit is contained in:
?ngel ?lvarez 2019-10-22 14:56:39 +02:00
parent dd44e670c2
commit 3c2073057d
27 changed files with 292 additions and 711 deletions

8
README
View File

@ -1,8 +0,0 @@
NaN-TIC patches
===============
Change to branch patches before to apply patch:
* v4.0
* v3.8
* ...

12
account_payment_view.diff Normal file
View File

@ -0,0 +1,12 @@
diff -r 9070eb9cb2e2 view/move_line_list.xml
--- a/trytond/trytond/modules/account_payment/view/move_line_list.xml Wed Oct 16 21:18:12 2019 +0200
+++ b/trytond/trytond/modules/account_payment/view/move_line_list.xml Tue Oct 22 14:43:33 2019 +0200
@@ -3,7 +3,7 @@
this repository contains the full copyright notices and license terms. -->
<tree>
<field name="move"/>
- <field name="origin"/>
+ <field name="move_origin"/>
<field name="description" expand="1"/>
<field name="party" expand="1"/>
<field name="maturity_date"/>

View File

@ -0,0 +1,27 @@
diff -r a79db218f578 invoice.py
--- a/trytond/trytond/modules/account_invoice/invoice.py Mon Jun 10 19:14:56 2019 +0200
+++ b/trytond/trytond/modules/account_invoice/invoice.py Sat Jul 13 10:00:36 2019 +0200
@@ -1306,6 +1306,8 @@
Credit invoices and return ids of new invoices.
Return the list of new invoice
'''
+ MoveLine = Pool().get('account.move.line')
+
new_invoices = [i._credit() for i in invoices]
cls.save(new_invoices)
cls.update_taxes(new_invoices)
@@ -1317,9 +1319,11 @@
gettext('account_invoice'
'.msg_invoice_credit_refund_not_posted',
invoice=invoice.rec_name))
- invoice.cancel_move = new_invoice.move
- cls.save(invoices)
- cls.cancel(invoices)
+ if new_invoice.state == 'posted':
+ MoveLine.reconcile([l for l in invoice.lines_to_pay
+ if not l.reconciliation] +
+ [l for l in new_invoice.lines_to_pay
+ if not l.reconciliation])
return new_invoices
@classmethod

View File

@ -1,414 +0,0 @@
Index: b/trytond/trytond/model/modelstorage.py
===================================================================
--- a/trytond/trytond/model/modelstorage.py
+++ b/trytond/trytond/model/modelstorage.py
@@ -5,6 +5,7 @@ import datetime
import time
import csv
import warnings
+import logging
from decimal import Decimal
from itertools import islice, ifilter, chain, izip
@@ -27,6 +28,7 @@ from .modelview import ModelView
from .descriptors import dualmethod
__all__ = ['ModelStorage', 'EvalEnvironment']
+logger = logging.getLogger(__name__)
def without_check_access(func):
@@ -1009,8 +1011,27 @@ class ModelStorage(Model):
domain,
])
if sub_relations != set(finds):
+ fail_field_value = sub_relations.difference(
+ set(finds)).pop()
+ error_args = cls._get_error_args(field.name)
+ error_args.update({
+ 'value': fail_field_value.rec_name if
+ isinstance(fail_field_value, Model)
+ else fail_field_value,
+ 'domain': getattr(cls, field_name).domain
+ })
+ msg = cls.raise_user_error('domain_validation_record',
+ error_args=error_args, raise_exception=False)
+ msg += ' Records: ' + ', '.join(
+ [str(r.id) for r in records])
+ msg += ' Domain: %s' % (domain,)
+ msg += ' Relations: ' + ', '.join(
+ [str(r.id) for r in list(sub_relations)])
+ msg += ' Finds: ' + ', '.join(
+ [str(r.id) for r in finds])
+ logger.warn(msg)
cls.raise_user_error('domain_validation_record',
- error_args=cls._get_error_args(field.name))
+ error_args=error_args)
field_names = set(field_names or [])
function_fields = {name for name, field in cls._fields.iteritems()
Index: b/trytond/trytond/ir/translation.xml
===================================================================
--- a/trytond/trytond/ir/translation.xml
+++ b/trytond/trytond/ir/translation.xml
@@ -129,8 +129,8 @@ this repository contains the full copyri
<field name="name">domain_validation_record</field>
<field name="lang">en</field>
<field name="type">error</field>
- <field name="src">The value of the field "%(field)s" on "%(model)s" is not valid according to its domain.</field>
- <field name="value">The value of the field "%(field)s" on "%(model)s" is not valid according to its domain.</field>
+ <field name="src">The value "%(value)s" of the field "%(field)s" on "%(model)s" is not valid according to its domain "%(domain)s".</field>
+ <field name="value">The value "%(value)s" of the field "%(field)s" on "%(model)s" is not valid according to its domain "%(domain)s".</field>
<field name="module">ir</field>
<field name="fuzzy" eval="False"/>
</record>
Index: b/trytond/trytond/ir/locale/bg.po
===================================================================
--- a/trytond/trytond/ir/locale/bg.po
+++ b/trytond/trytond/ir/locale/bg.po
@@ -26,11 +26,11 @@ msgstr ""
msgctxt "error:domain_validation_record:"
msgid ""
-"The value of the field \"%(field)s\" on \"%(model)s\" is not valid according"
-" to its domain."
+"The value \"%(value)s\" of the field \"%(field)s\" on \"%(model)s\" is not "
+"valid according to its domain \"%(domain)s\"."
msgstr ""
-"The value of the field \"%(field)s\" on \"%(model)s\" is not valid according"
-" to its domain."
+"The value \"%(value)s\" of the field \"%(field)s\" on \"%(model)s\" is not "
+"valid according to its domain \"%(domain)s\"."
msgctxt "error:foreign_model_exist:"
msgid ""
Index: b/trytond/trytond/ir/locale/ca.po
===================================================================
--- a/trytond/trytond/ir/locale/ca.po
+++ b/trytond/trytond/ir/locale/ca.po
@@ -24,11 +24,11 @@ msgstr ""
msgctxt "error:domain_validation_record:"
msgid ""
-"The value of the field \"%(field)s\" on \"%(model)s\" is not valid according"
-" to its domain."
+"The value \"%(value)s\" of the field \"%(field)s\" on \"%(model)s\" is not "
+"valid according to its domain \"%(domain)s\"."
msgstr ""
-"El valor del camp \"%(field)s\" de \"%(model)s\" no és correcte segons "
-"aquest domini."
+"El valor \"%(field)s\" del camp \"%(field)s\" de \"%(model)s\" no és correcte segons "
+"aquest domini \"%(domain)s\"."
msgctxt "error:foreign_model_exist:"
msgid ""
Index: b/trytond/trytond/ir/locale/cs.po
===================================================================
--- a/trytond/trytond/ir/locale/cs.po
+++ b/trytond/trytond/ir/locale/cs.po
@@ -24,11 +24,11 @@ msgstr ""
msgctxt "error:domain_validation_record:"
msgid ""
-"The value of the field \"%(field)s\" on \"%(model)s\" is not valid according"
-" to its domain."
+"The value \"%(value)s\" of the field \"%(field)s\" on \"%(model)s\" is not "
+"valid according to its domain \"%(domain)s\"."
msgstr ""
-"The value of the field \"%(field)s\" on \"%(model)s\" is not valid according"
-" to its domain."
+"The value \"%(value)s\" of the field \"%(field)s\" on \"%(model)s\" is not "
+"valid according to its domain \"%(domain)s\"."
msgctxt "error:foreign_model_exist:"
msgid ""
Index: b/trytond/trytond/ir/locale/de.po
===================================================================
--- a/trytond/trytond/ir/locale/de.po
+++ b/trytond/trytond/ir/locale/de.po
@@ -23,11 +23,11 @@ msgstr ""
msgctxt "error:domain_validation_record:"
msgid ""
-"The value of the field \"%(field)s\" on \"%(model)s\" is not valid according"
-" to its domain."
+"The value \"%(value)s\" of the field \"%(field)s\" on \"%(model)s\" is not "
+"valid according to its domain \"%(domain)s\"."
msgstr ""
-"Der Wert des Feldes \"%(field)s\" in \"%(model)s\" liegt nicht im gültigen "
-"Wertebereich (Domain)."
+"Der Wert \"%(value)s\" des Feldes \"%(field)s\" in \"%(model)s\" liegt nicht im gültigen "
+"Wertebereich (Domain) \"%(domain)s\"."
msgctxt "error:foreign_model_exist:"
msgid ""
Index: b/trytond/trytond/ir/locale/es.po
===================================================================
--- a/trytond/trytond/ir/locale/es.po
+++ b/trytond/trytond/ir/locale/es.po
@@ -22,11 +22,11 @@ msgstr ""
msgctxt "error:domain_validation_record:"
msgid ""
-"The value of the field \"%(field)s\" on \"%(model)s\" is not valid according"
-" to its domain."
+"The value \"%(value)s\" of the field \"%(field)s\" on \"%(model)s\" is not "
+"valid according to its domain \"%(domain)s\"."
msgstr ""
-"El valor del campo \"%(field)s\" de \"%(model)s\" no es correcto según su "
-"dominio."
+"El valor \"%(value)s\" del campo \"%(field)s\" de \"%(model)s\" no es correcto según su "
+"dominio \"%(domain)s\"."
msgctxt "error:foreign_model_exist:"
msgid ""
Index: b/trytond/trytond/ir/locale/es_419.po
===================================================================
--- a/trytond/trytond/ir/locale/es_419.po
+++ b/trytond/trytond/ir/locale/es_419.po
@@ -20,8 +20,8 @@ msgstr ""
msgctxt "error:domain_validation_record:"
msgid ""
-"The value of the field \"%(field)s\" on \"%(model)s\" is not valid according"
-" to its domain."
+"The value \"%(value)s\" of the field \"%(field)s\" on \"%(model)s\" is not "
+"valid according to its domain \"%(domain)s\"."
msgstr ""
msgctxt "error:foreign_model_exist:"
Index: b/trytond/trytond/ir/locale/fa.po
===================================================================
--- a/trytond/trytond/ir/locale/fa.po
+++ b/trytond/trytond/ir/locale/fa.po
@@ -24,8 +24,8 @@ msgstr ""
msgctxt "error:domain_validation_record:"
msgid ""
-"The value of the field \"%(field)s\" on \"%(model)s\" is not valid according"
-" to its domain."
+"The value \"%(value)s\" of the field \"%(field)s\" on \"%(model)s\" is not "
+"valid according to its domain \"%(domain)s\"."
msgstr "مقدار فیلد: \"%s\" در مدل: \"%s\" باتوجه به دامنه آن معتبر نیست."
msgctxt "error:foreign_model_exist:"
Index: b/trytond/trytond/ir/locale/fr.po
===================================================================
--- a/trytond/trytond/ir/locale/fr.po
+++ b/trytond/trytond/ir/locale/fr.po
@@ -24,11 +24,11 @@ msgstr ""
msgctxt "error:domain_validation_record:"
msgid ""
-"The value of the field \"%(field)s\" on \"%(model)s\" is not valid according"
-" to its domain."
+"The value \"%(value)s\" of the field \"%(field)s\" on \"%(model)s\" is not "
+"valid according to its domain \"%(domain)s\"."
msgstr ""
-"La valeur du champ « %(field)s » sur « %(model)s » n'est pas valide selon "
-"son domaine."
+"La valeur \"%(value)s\" du champ « %(field)s » sur « %(model)s » n'est pas valide selon "
+"son domaine \"%(domain)s\"."
msgctxt "error:foreign_model_exist:"
msgid ""
Index: b/trytond/trytond/ir/locale/hu_HU.po
===================================================================
--- a/trytond/trytond/ir/locale/hu_HU.po
+++ b/trytond/trytond/ir/locale/hu_HU.po
@@ -27,11 +27,11 @@ msgstr ""
#, fuzzy
msgctxt "error:domain_validation_record:"
msgid ""
-"The value of the field \"%(field)s\" on \"%(model)s\" is not valid according"
-" to its domain."
+"The value \"%(value)s\" of the field \"%(field)s\" on \"%(model)s\" is not "
+"valid according to its domain \"%(domain)s\"."
msgstr ""
-"The value of the field \"%(field)s\" on \"%(model)s\" is not valid according"
-" to its domain."
+"The value \"%(value)s\" of the field \"%(field)s\" on \"%(model)s\" is not "
+"valid according to its domain \"%(domain)s\"."
#, fuzzy
msgctxt "error:foreign_model_exist:"
Index: b/trytond/trytond/ir/locale/it_IT.po
===================================================================
--- a/trytond/trytond/ir/locale/it_IT.po
+++ b/trytond/trytond/ir/locale/it_IT.po
@@ -27,11 +27,11 @@ msgstr ""
#, fuzzy
msgctxt "error:domain_validation_record:"
msgid ""
-"The value of the field \"%(field)s\" on \"%(model)s\" is not valid according"
-" to its domain."
+"The value \"%(value)s\" of the field \"%(field)s\" on \"%(model)s\" is not "
+"valid according to its domain \"%(domain)s\"."
msgstr ""
-"The value of the field \"%(field)s\" on \"%(model)s\" is not valid according"
-" to its domain."
+"The value \"%(value)s\" of the field \"%(field)s\" on \"%(model)s\" is not "
+"valid according to its domain \"%(domain)s\"."
#, fuzzy
msgctxt "error:foreign_model_exist:"
Index: b/trytond/trytond/ir/locale/ja_JP.po
===================================================================
--- a/trytond/trytond/ir/locale/ja_JP.po
+++ b/trytond/trytond/ir/locale/ja_JP.po
@@ -24,11 +24,11 @@ msgstr ""
msgctxt "error:domain_validation_record:"
msgid ""
-"The value of the field \"%(field)s\" on \"%(model)s\" is not valid according"
-" to its domain."
+"The value \"%(value)s\" of the field \"%(field)s\" on \"%(model)s\" is not "
+"valid according to its domain \"%(domain)s\"."
msgstr ""
-"The value of the field \"%(field)s\" on \"%(model)s\" is not valid according"
-" to its domain."
+"The value \"%(value)s\" of the field \"%(field)s\" on \"%(model)s\" is not "
+"valid according to its domain \"%(domain)s\"."
msgctxt "error:foreign_model_exist:"
msgid ""
Index: b/trytond/trytond/ir/locale/lo.po
===================================================================
--- a/trytond/trytond/ir/locale/lo.po
+++ b/trytond/trytond/ir/locale/lo.po
@@ -24,11 +24,11 @@ msgstr ""
msgctxt "error:domain_validation_record:"
msgid ""
-"The value of the field \"%(field)s\" on \"%(model)s\" is not valid according"
-" to its domain."
+"The value \"%(value)s\" of the field \"%(field)s\" on \"%(model)s\" is not "
+"valid according to its domain \"%(domain)s\"."
msgstr ""
-"The value of the field \"%(field)s\" on \"%(model)s\" is not valid according"
-" to its domain."
+"The value \"%(value)s\" of the field \"%(field)s\" on \"%(model)s\" is not "
+"valid according to its domain \"%(domain)s\"."
msgctxt "error:foreign_model_exist:"
msgid ""
Index: b/trytond/trytond/ir/locale/nl.po
===================================================================
--- a/trytond/trytond/ir/locale/nl.po
+++ b/trytond/trytond/ir/locale/nl.po
@@ -26,11 +26,11 @@ msgstr ""
msgctxt "error:domain_validation_record:"
msgid ""
-"The value of the field \"%(field)s\" on \"%(model)s\" is not valid according"
-" to its domain."
+"The value \"%(value)s\" of the field \"%(field)s\" on \"%(model)s\" is not "
+"valid according to its domain \"%(domain)s\"."
msgstr ""
-"The value of the field \"%(field)s\" on \"%(model)s\" is not valid according"
-" to its domain."
+"The value \"%(value)s\" of the field \"%(field)s\" on \"%(model)s\" is not "
+"valid according to its domain \"%(domain)s\"."
msgctxt "error:foreign_model_exist:"
msgid ""
Index: b/trytond/trytond/ir/locale/pl.po
===================================================================
--- a/trytond/trytond/ir/locale/pl.po
+++ b/trytond/trytond/ir/locale/pl.po
@@ -24,11 +24,11 @@ msgstr ""
msgctxt "error:domain_validation_record:"
msgid ""
-"The value of the field \"%(field)s\" on \"%(model)s\" is not valid according"
-" to its domain."
+"The value \"%(value)s\" of the field \"%(field)s\" on \"%(model)s\" is not "
+"valid according to its domain \"%(domain)s\"."
msgstr ""
-"Wartość w polu \"%(field)s\" dla \"%(model)s\" jest nieprawidłowa względem "
-"swojej domeny."
+"Wartość \"%(value)s\" w polu \"%(field)s\" dla \"%(model)s\" jest "
+"nieprawidłowa względem swojej domeny\"%(domain)s\"."
msgctxt "error:foreign_model_exist:"
msgid ""
Index: b/trytond/trytond/ir/locale/pt_BR.po
===================================================================
--- a/trytond/trytond/ir/locale/pt_BR.po
+++ b/trytond/trytond/ir/locale/pt_BR.po
@@ -27,11 +27,11 @@ msgstr ""
#, fuzzy
msgctxt "error:domain_validation_record:"
msgid ""
-"The value of the field \"%(field)s\" on \"%(model)s\" is not valid according"
-" to its domain."
+"The value \"%(value)s\" of the field \"%(field)s\" on \"%(model)s\" is not "
+"valid according to its domain \"%(domain)s\"."
msgstr ""
-"The value of the field \"%(field)s\" on \"%(model)s\" is not valid according"
-" to its domain."
+"The value \"%(value)s\" of the field \"%(field)s\" on \"%(model)s\" is not "
+"valid according to its domain \"%(domain)s\"."
#, fuzzy
msgctxt "error:foreign_model_exist:"
Index: b/trytond/trytond/ir/locale/ru.po
===================================================================
--- a/trytond/trytond/ir/locale/ru.po
+++ b/trytond/trytond/ir/locale/ru.po
@@ -26,11 +26,11 @@ msgstr ""
msgctxt "error:domain_validation_record:"
msgid ""
-"The value of the field \"%(field)s\" on \"%(model)s\" is not valid according"
-" to its domain."
+"The value \"%(value)s\" of the field \"%(field)s\" on \"%(model)s\" is not "
+"valid according to its domain \"%(domain)s\"."
msgstr ""
-"The value of the field \"%(field)s\" on \"%(model)s\" is not valid according"
-" to its domain."
+"The value \"%(value)s\" of the field \"%(field)s\" on \"%(model)s\" is not "
+"valid according to its domain \"%(domain)s\".""
msgctxt "error:foreign_model_exist:"
msgid ""
Index: b/trytond/trytond/ir/locale/sl.po
===================================================================
--- a/trytond/trytond/ir/locale/sl.po
+++ b/trytond/trytond/ir/locale/sl.po
@@ -27,11 +27,11 @@ msgstr ""
#, fuzzy
msgctxt "error:domain_validation_record:"
msgid ""
-"The value of the field \"%(field)s\" on \"%(model)s\" is not valid according"
-" to its domain."
+"The value \"%(value)s\" of the field \"%(field)s\" on \"%(model)s\" is not "
+"valid according to its domain \"%(domain)s\"."
msgstr ""
-"The value of the field \"%(field)s\" on \"%(model)s\" is not valid according"
-" to its domain."
+"The value \"%(value)s\" of the field \"%(field)s\" on \"%(model)s\" is not "
+"valid according to its domain \"%(domain)s\"."
#, fuzzy
msgctxt "error:foreign_model_exist:"
Index: b/trytond/trytond/ir/locale/zh_CN.po
===================================================================
--- a/trytond/trytond/ir/locale/zh_CN.po
+++ b/trytond/trytond/ir/locale/zh_CN.po
@@ -27,11 +27,11 @@ msgstr ""
#, fuzzy
msgctxt "error:domain_validation_record:"
msgid ""
-"The value of the field \"%(field)s\" on \"%(model)s\" is not valid according"
-" to its domain."
+"The value \"%(value)s\" of the field \"%(field)s\" on \"%(model)s\" is not "
+"valid according to its domain \"%(domain)s\"."
msgstr ""
-"The value of the field \"%(field)s\" on \"%(model)s\" is not valid according"
-" to its domain."
+"The value \"%(value)s\" of the field \"%(field)s\" on \"%(model)s\" is not "
+"valid according to its domain \"%(domain)s\"."
#, fuzzy
msgctxt "error:foreign_model_exist:"

View File

@ -1,72 +0,0 @@
diff -r e978ecc8f044 trytond/trytond/modules/account/view/account_list.xml
--- a/trytond/trytond/modules/account/view/account_list.xml Mon Apr 23 17:24:11 2018 +0200
+++ b/trytond/trytond/modules/account/view/account_list.xml Fri May 11 14:15:10 2018 +0200
@@ -5,4 +5,5 @@
<field name="rec_name"/>
<field name="company"/>
<field name="type"/>
+ <field name="active" tree_invisible="1"/>
</tree>
diff -r e978ecc8f044 trytond/trytond/modules/account/view/account_tree.xml
--- a/trytond/trytond/modules/account/view/account_tree.xml Mon Apr 23 17:24:11 2018 +0200
+++ b/trytond/trytond/modules/account/view/account_tree.xml Fri May 11 14:15:10 2018 +0200
@@ -7,4 +7,5 @@
<field name="type"/>
<field name="parent" tree_invisible="1"/>
<field name="childs" tree_invisible="1"/>
+ <field name="active" tree_invisible="1"/>
</tree>
diff -r e978ecc8f044 trytond/trytond/modules/account/view/journal_period_tree.xml
--- a/trytond/trytond/modules/account/view/journal_period_tree.xml Mon Apr 23 17:24:11 2018 +0200
+++ b/trytond/trytond/modules/account/view/journal_period_tree.xml Fri May 11 14:15:10 2018 +0200
@@ -5,4 +5,5 @@
<field name="journal"/>
<field name="period"/>
<field name="state"/>
+ <field name="active" tree_invisible="1"/>
</tree>
diff -r e978ecc8f044 trytond/trytond/modules/account/view/journal_tree.xml
--- a/trytond/trytond/modules/account/view/journal_tree.xml Mon Apr 23 17:24:11 2018 +0200
+++ b/trytond/trytond/modules/account/view/journal_tree.xml Fri May 11 14:15:10 2018 +0200
@@ -5,4 +5,5 @@
<field name="name"/>
<field name="code"/>
<field name="type"/>
+ <field name="active" tree_invisible="1"/>
</tree>
diff -r e978ecc8f044 trytond/trytond/modules/account/view/move_template_list.xml
--- a/trytond/trytond/modules/account/view/move_template_list.xml Mon Apr 23 17:24:11 2018 +0200
+++ b/trytond/trytond/modules/account/view/move_template_list.xml Fri May 11 14:15:10 2018 +0200
@@ -3,4 +3,5 @@
this repository contains the full copyright notices and license terms. -->
<tree>
<field name="name"/>
+ <field name="active" tree_invisible="1"/>
</tree>
diff -r e978ecc8f044 trytond/trytond/modules/account/view/tax_code_list.xml
--- a/trytond/trytond/modules/account/view/tax_code_list.xml Mon Apr 23 17:24:11 2018 +0200
+++ b/trytond/trytond/modules/account/view/tax_code_list.xml Fri May 11 14:15:10 2018 +0200
@@ -5,4 +5,5 @@
<field name="name"/>
<field name="code"/>
<field name="company"/>
+ <field name="active" tree_invisible="1"/>
</tree>
diff -r e978ecc8f044 trytond/trytond/modules/account/view/tax_code_tree.xml
--- a/trytond/trytond/modules/account/view/tax_code_tree.xml Mon Apr 23 17:24:11 2018 +0200
+++ b/trytond/trytond/modules/account/view/tax_code_tree.xml Fri May 11 14:15:10 2018 +0200
@@ -7,4 +7,5 @@
<field name="company"/>
<field name="parent" tree_invisible="1"/>
<field name="childs" tree_invisible="1"/>
+ <field name="active" tree_invisible="1"/>
</tree>
diff -r e978ecc8f044 trytond/trytond/modules/account/view/tax_list.xml
--- a/trytond/trytond/modules/account/view/tax_list.xml Mon Apr 23 17:24:11 2018 +0200
+++ b/trytond/trytond/modules/account/view/tax_list.xml Fri May 11 14:15:10 2018 +0200
@@ -5,4 +5,5 @@
<field name="name"/>
<field name="group"/>
<field name="type"/>
+ <field name="active" tree_invisible="1"/>
</tree>

View File

@ -88,6 +88,6 @@ diff -r f95dbecc064f trytond/trytond/modules/stock/move.py
location = key[0]
uom = default_uom[id_getter(key)]
- quantities[key] = uom.round(quantity)
+ quantities[key] = uom.round(quantity) if quantity else 0.0
+ quantities[key] = uom.round(float(quantity)) if quantity else 0.0
return quantities

View File

@ -1,21 +0,0 @@
diff -r 0447f28ab266 trytond/trytond/modules/account/move.py
--- a/trytond/trytond/modules/account/move.py Wed Sep 12 15:56:58 2018 +0200
+++ b/trytond/trytond/modules/account/move.py Wed Sep 12 16:09:55 2018 +0200
@@ -635,7 +635,6 @@
party_required = fields.Function(fields.Boolean('Party Required'),
'on_change_with_party_required')
maturity_date = fields.Date('Maturity Date',
- states=_states, depends=_depends,
help='This field is used for payable and receivable lines. \n'
'You can put the limit date for the payment.')
state = fields.Selection([
@@ -668,7 +667,8 @@
@classmethod
def __setup__(cls):
super(Line, cls).__setup__()
- cls._check_modify_exclude = {'reconciliation'}
+ cls._check_modify_exclude = {
+ 'maturity_date', 'reconciliation', 'tax_lines'}
cls._reconciliation_modify_disallow = {
'account', 'debit', 'credit', 'party',
}

View File

@ -1,13 +0,0 @@
diff -r 4c5abccfccf2 trytond/trytond/modules/stock_package/stock.py
--- a/trytond/trytond/modules/stock_package/stock.py Mon Apr 23 17:36:31 2018 +0200
+++ b/trytond/trytond/modules/stock_package/stock.py Tue Oct 30 12:45:02 2018 +0100
@@ -212,7 +212,8 @@
@property
def packages_moves(self):
- return (m for m in self.outgoing_moves if m.state != 'cancel')
+ return (m for m in self.outgoing_moves
+ if m.state != 'cancel' and m.quantity != 0.0)
class ShipmentInReturn(PackageMixin, object):

View File

@ -1,20 +0,0 @@
diff -r 10d517bd46f1 trytond/trytond/modules/stock/move.py
--- a/trytond/trytond/modules/stock/move.py Wed Nov 14 09:54:25 2018 +0100
+++ b/trytond/trytond/modules/stock/move.py Wed Nov 14 09:55:39 2018 +0100
@@ -907,6 +907,7 @@
if move.state == 'staging':
success = False
continue
+ to_location = move.to_location
# Keep location order for pick_product
location_qties = OrderedDict()
if with_childs:
@@ -919,6 +920,8 @@
else:
childs = [move.from_location]
for location in childs:
+ if location.id == to_location.id:
+ continue
key = get_key(move, location)
if key in pbl:
location_qties[location] = Uom.compute_qty(

View File

@ -1,21 +0,0 @@
Index: ./trytond/trytond/modules/stock_supply_production/production.py
===================================================================
--- ./trytond/trytond/modules/stock_supply_production/production.py
+++ ./trytond/trytond/modules/stock_supply_production/production.py
@@ -1,6 +1,7 @@
# This file is part of Tryton. The COPYRIGHT file at the top level of
# this repository contains the full copyright notices and license terms.
import datetime
+from decimal import Decimal
from collections import defaultdict
from trytond.model import ModelSQL, ValueMixin, fields
@@ -141,7 +142,7 @@ class Production(metaclass=PoolMeta):
product=product,
bom=product.boms[0].bom if product.boms else None,
uom=product.default_uom,
- quantity=quantity,
+ quantity=float(Decimal(quantity).quantize(Decimal(str(10 ** -product.default_uom.digits)))),
state='request',
)

View File

@ -1,12 +0,0 @@
diff -r 254e4bb38458 carrier.py
--- a/trytond/trytond/modules/carrier/carrier.py Mon May 06 15:01:12 2019 +0200
+++ b/trytond/trytond/modules/carrier/carrier.py Mon Jun 10 10:00:08 2019 +0200
@@ -13,6 +13,8 @@
class Carrier(ModelSQL, ModelView):
'Carrier'
__name__ = 'carrier'
+ _rec_name = 'party'
+
party = fields.Many2One('party.party', 'Party', required=True,
ondelete='CASCADE', help="The party which represents the carrier.")
carrier_product = fields.Many2One('product.product', 'Carrier Product',

View File

@ -1,19 +0,0 @@
diff -r 71b6021e784d move_template.py
--- a/trytond/trytond/modules/account/move_template.py Mon Jun 10 19:16:18 2019 +0200
+++ b/trytond/trytond/modules/account/move_template.py Wed Jun 12 10:10:46 2019 +0200
@@ -88,6 +88,7 @@
'name': self.name,
'string': self.string,
'required': self.required,
+ 'help': '',
})
return field
@@ -256,6 +257,7 @@
'model': 'account.move.template.create.keywords',
'view_id': 0,
'fields': fields,
+ 'type': 'form',
}
if not hasattr(wizard.template, 'template'):
return view

21
issue8479.diff Normal file
View File

@ -0,0 +1,21 @@
diff -r 80d34e8f57a0 trytond/trytond/modules/account_invoice/invoice.xml
--- a/trytond/trytond/modules/account_invoice/invoice.xml Mon Jul 08 11:14:42 2019 +0200
+++ b/trytond/trytond/modules/account_invoice/invoice.xml Mon Jul 08 11:15:43 2019 +0200
@@ -411,5 +411,17 @@
pyson="1"/>
<field name="rule_group" ref="rule_group_invoice_line"/>
</record>
+
+ <record model="ir.rule.group" id="rule_group_invoice_payment_method">
+ <field name="name">User in company</field>
+ <field name="model" search="[('model', '=', 'account.invoice.payment.method')]"/>
+ <field name="global_p" eval="True"/>
+ </record>
+ <record model="ir.rule" id="rule_invoice_payment_method1">
+ <field name="domain"
+ eval="[('company', '=', Eval('user', {}).get('company', None))]"
+ pyson="1"/>
+ <field name="rule_group" ref="rule_group_invoice_payment_method"/>
+ </record>
</data>
</tryton>

20
issue8618.diff Normal file
View File

@ -0,0 +1,20 @@
diff -r 6597f33e51d2 invoice.py
--- a/trytond/trytond/modules/account_invoice/invoice.py Fri Aug 09 16:33:39 2019 +0200
+++ b/trytond/trytond/modules/account_invoice/invoice.py Wed Aug 28 23:44:50 2019 +0200
@@ -2267,7 +2267,7 @@
else:
self.account = tax.credit_note_account
- @fields.depends('tax', 'base', 'amount', 'manual', 'invoice',
+ @fields.depends('tax', 'base', 'manual', 'invoice',
'_parent_invoice.currency')
def on_change_with_amount(self):
Tax = Pool().get('account.tax')
@@ -2281,7 +2281,6 @@
if self.invoice.currency:
amount = self.invoice.currency.round(amount)
return amount
- return self.amount
@classmethod
def check_modify(cls, taxes):

13
issue8699.diff Normal file
View File

@ -0,0 +1,13 @@
diff -r f4710591683e move.py
--- a/trytond/trytond/modules/product_cost_fifo/move.py Mon May 06 15:06:16 2019 +0200
+++ b/trytond/trytond/modules/product_cost_fifo/move.py Wed Oct 02 10:57:59 2019 +0200
@@ -70,6 +70,9 @@
if Decimal(str(consumed_qty)) != Decimal("0"):
cost_price = cost_price / Decimal(str(consumed_qty))
+ else:
+ cost_price = self.product.get_multivalue(
+ 'cost_price', **self._cost_price_pattern)
# Compute average cost price
unit_price = self.unit_price

81
issue8702.diff Normal file
View File

@ -0,0 +1,81 @@
diff -r 168b01453902 __init__.py
--- a/trytond/trytond/modules/stock_supply_forecast/__init__.py Mon May 06 15:17:58 2019 +0200
+++ b/trytond/trytond/modules/stock_supply_forecast/__init__.py Fri Oct 04 10:04:50 2019 +0000
@@ -2,10 +2,10 @@
# this repository contains the full copyright notices and license terms.
from trytond.pool import Pool
-from .purchase_request import *
+from . import stock
def register():
Pool.register(
- PurchaseRequest,
- module='stock_supply_forecast', type_='model')
+ stock.StockSupply,
+ module='stock_supply_forecast', type_='wizard')
diff -r 168b01453902 purchase_request.py
--- a/trytond/trytond/modules/stock_supply_forecast/purchase_request.py Mon May 06 15:17:58 2019 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,25 +0,0 @@
-# This file is part of Tryton. The COPYRIGHT file at the top level of
-# this repository contains the full copyright notices and license terms.
-from trytond.pool import Pool, PoolMeta
-
-__all__ = ['PurchaseRequest']
-
-
-class PurchaseRequest(metaclass=PoolMeta):
- __name__ = 'purchase.request'
-
- @classmethod
- def generate_requests(cls, *args, **kwargs):
- pool = Pool()
- Forecast = pool.get('stock.forecast')
- Date = pool.get('ir.date')
-
- today = Date.today()
-
- forecasts = Forecast.search([
- ('to_date', '>=', today),
- ('state', '=', 'done'),
- ])
- Forecast.create_moves(forecasts)
- super(PurchaseRequest, cls).generate_requests(*args, **kwargs)
- Forecast.delete_moves(forecasts)
diff -r 168b01453902 stock.py
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/trytond/trytond/modules/stock_supply_forecast/stock.py Fri Oct 04 10:04:50 2019 +0000
@@ -0,0 +1,22 @@
+# This file is part of Tryton. The COPYRIGHT file at the top level of
+# this repository contains the full copyright notices and license terms.
+from trytond.pool import Pool, PoolMeta
+
+class StockSupply(metaclass=PoolMeta):
+ __name__ = 'stock.supply'
+
+ def transition_create_(self):
+ pool = Pool()
+ Forecast = pool.get('stock.forecast')
+ Date = pool.get('ir.date')
+
+ today = Date.today()
+
+ forecasts = Forecast.search([
+ ('to_date', '>=', today),
+ ('state', '=', 'done'),
+ ])
+ Forecast.create_moves(forecasts)
+ res = super(StockSupply, self).transition_create_()
+ Forecast.delete_moves(forecasts)
+ return res
diff -r 168b01453902 tryton.cfg
--- a/trytond/trytond/modules/stock_supply_forecast/tryton.cfg Mon May 06 15:17:58 2019 +0200
+++ b/trytond/trytond/modules/stock_supply_forecast/tryton.cfg Fri Oct 04 10:04:50 2019 +0000
@@ -4,3 +4,5 @@
ir
stock_supply
stock_forecast
+extras_depend:
+ stock_supply_production

13
issue8703.diff Normal file
View File

@ -0,0 +1,13 @@
diff -r 9a6e9a12677d forecast.py
--- a/trytond/trytond/modules/stock_forecast/forecast.py Mon May 06 15:14:52 2019 +0200
+++ b/trytond/trytond/modules/stock_forecast/forecast.py Fri Oct 04 11:33:31 2019 +0200
@@ -457,8 +457,7 @@
move.product = self.product
move.uom = self.uom
move.quantity = qty * self.minimal_quantity
- move.planned_date = (self.forecast.from_date
- + datetime.timedelta(day))
+ move.planned_date = from_date + datetime.timedelta(day)
move.company = self.forecast.company
move.currency = self.forecast.company.currency
move.unit_price = unit_price

View File

@ -1,24 +0,0 @@
diff -r c1860f118efd move.py
--- a/trytond/trytond/modules/stock/move.py Wed Nov 07 12:14:26 2018 +0100
+++ b/trytond/trytond/modules/stock/move.py Wed Nov 07 12:18:14 2018 +0100
@@ -823,6 +823,10 @@
return to_pick
return to_pick
+ @staticmethod
+ def lock_stock_move():
+ return True
+
@classmethod
def assign_try(cls, moves, with_childs=True, grouping=('product',)):
'''
@@ -878,7 +882,8 @@
with connection.cursor() as cursor:
cursor.execute(*query)
else:
- database.lock(connection, cls._table)
+ if cls.lock_stock_move():
+ database.lock(connection, cls._table)
with Transaction().set_context(
stock_date_end=stock_date_end,

View File

@ -1,12 +0,0 @@
diff -r 5b4101d67bb7 trytond/model/match.py
--- a/trytond/trytond/model/match.py Mon Oct 15 22:49:51 2018 +0200
+++ b/trytond/trytond/model/match.py Sat Nov 03 18:21:44 2018 +0100
@@ -10,6 +10,8 @@
and matching value as value'''
for field, pattern_value in pattern.iteritems():
value = getattr(self, field)
+ if self._fields[field]._type in ('char', 'text') and value == "":
+ value = None
if not match_none and value is None:
continue
if self._fields[field]._type == 'many2one':

View File

@ -1,17 +0,0 @@
diff -r d04990e66e97 party.py
--- a/trytond/trytond/modules/party/party.py Wed Mar 27 23:25:26 2019 +0100
+++ b/trytond/trytond/modules/party/party.py Mon Apr 01 14:49:19 2019 +0200
@@ -454,8 +454,11 @@
continue
for type in Party.tax_identifier_types():
module = get_cc_module(*type.split('_', 1))
- if module.is_valid(code):
- break
+ try:
+ if module and module.is_valid(code):
+ break
+ except:
+ pass
else:
type = None
identifiers.append(

View File

@ -1,16 +1,67 @@
diff -r 74028491a4a5 view/production_form.xml
diff -r 74028491a4a5 trytond/trytond/modules/production/locale/ca.po
--- a/trytond/trytond/modules/production/locale/ca.po Mon May 06 15:06:40 2019 +0200
+++ b/trytond/trytond/modules/production/locale/ca.po Tue Jul 23 11:43:54 2019 +0200
@@ -736,6 +736,10 @@
msgstr "Línies"
msgctxt "view:production:"
+msgid "Inputs"
+msgstr "Entrades"
+
+msgctxt "view:production:"
msgid "Lines"
msgstr "Línies"
@@ -743,6 +747,10 @@
msgid "Other Info"
msgstr "Informació addicional"
+msgctxt "view:production:"
+msgid "Outputs"
+msgstr "Sortides"
+
msgctxt "wizard_button:production.assign,failed,end:"
msgid "OK"
msgstr "D'acord"
diff -r 74028491a4a5 trytond/trytond/modules/production/locale/es.po
--- a/trytond/trytond/modules/production/locale/es.po Mon May 06 15:06:40 2019 +0200
+++ b/trytond/trytond/modules/production/locale/es.po Tue Jul 23 11:43:54 2019 +0200
@@ -736,6 +736,10 @@
msgstr "Líneas"
msgctxt "view:production:"
+msgid "Inputs"
+msgstr "Entradas"
+
+msgctxt "view:production:"
msgid "Lines"
msgstr "Líneas"
@@ -743,6 +747,10 @@
msgid "Other Info"
msgstr "Información adicional"
+msgctxt "view:production:"
+msgid "Outputs"
+msgstr "Salidas"
+
msgctxt "wizard_button:production.assign,failed,end:"
msgid "OK"
msgstr "Aceptar"
diff -r 74028491a4a5 trytond/trytond/modules/production/view/production_form.xml
--- a/trytond/trytond/modules/production/view/production_form.xml Mon May 06 15:06:40 2019 +0200
+++ b/trytond/trytond/modules/production/view/production_form.xml Sun Jun 09 18:04:23 2019 +0200
+++ b/trytond/trytond/modules/production/view/production_form.xml Tue Jul 23 11:43:54 2019 +0200
@@ -19,9 +19,11 @@
<label name="uom"/>
<field name="uom"/>
<notebook>
- <page string="Lines" id="lines">
+ <page name="inputs" id="inputs">
<field name="inputs" colspan="2"/>
- <field name="inputs" colspan="2"/>
- <field name="outputs" colspan="2"/>
+ <page string="Inputs" id="inputs">
+ <field name="inputs" colspan="2"/>
+ </page>
+ <page name="outputs" id="lines">
+ <page string="Outputs" id="lines">
+ <field name="outputs" colspan="2"/>
</page>
<page string="Other Info" id="other">

13
sale_copy.diff Normal file
View File

@ -0,0 +1,13 @@
diff -r 7fdc432c6f03 trytond/trytond/modules/sale/sale.py
--- a/trytond/trytond/modules/sale/sale.py Mon May 06 15:10:35 2019 +0200
+++ b/trytond/trytond/modules/sale/sale.py Tue Jul 23 16:27:52 2019 +0200
@@ -656,6 +656,9 @@
default.setdefault('moves', None)
default.setdefault('shipment_state', 'none')
default.setdefault('sale_date', None)
+ default.setdefault('untaxed_amount_cache', None)
+ default.setdefault('tax_amount_cache', None)
+ default.setdefault('total_amount_cache', None)
return super(Sale, cls).copy(sales, default=default)
def check_for_quotation(self):

View File

@ -1,16 +1,7 @@
diff -r 656db55c90c0 trytond/trytond/modules/sale/product.py
--- a/trytond/trytond/modules/sale/product.py Sat Jan 26 01:12:51 2019 +0100
+++ b/trytond/trytond/modules/sale/product.py Wed Feb 06 16:31:25 2019 +0100
@@ -1,7 +1,7 @@
# This file is part of Tryton. The COPYRIGHT file at the top level of
# this repository contains the full copyright notices and license terms.
import datetime
-
+from decimal import Decimal
from trytond.model import fields
from trytond.pyson import Eval
from trytond.pool import Pool, PoolMeta
@@ -137,7 +137,7 @@
diff -r 5809fe404415 product.py
--- a/trytond/trytond/modules/sale/product.py Tue Oct 01 22:23:55 2019 +0200
+++ b/trytond/trytond/modules/sale/product.py Tue Oct 22 14:52:38 2019 +0200
@@ -119,7 +119,7 @@
user = User(Transaction().user)
for product in products:

View File

@ -1,21 +0,0 @@
diff -r 7fdc432c6f03 view/handle_invoice_exception_ask_form.xml
--- a/trytond/trytond/modules/sale/view/handle_invoice_exception_ask_form.xml Mon May 06 15:10:35 2019 +0200
+++ b/trytond/trytond/modules/sale/view/handle_invoice_exception_ask_form.xml Wed Jun 12 15:03:41 2019 +0200
@@ -5,6 +5,5 @@
<image name="tryton-info" xexpand="0" xfill="0"/>
<label string="Choose invoices to recreate" id="choose"
yalign="0.0" xalign="0.0" xexpand="1"/>
- <field name="recreate_invoices" colspan="2" widget="multiselection"/>
+ <field name="recreate_invoices" colspan="2"/>
</form>
-
diff -r 7fdc432c6f03 view/handle_shipment_exception_ask_form.xml
--- a/trytond/trytond/modules/sale/view/handle_shipment_exception_ask_form.xml Mon May 06 15:10:35 2019 +0200
+++ b/trytond/trytond/modules/sale/view/handle_shipment_exception_ask_form.xml Wed Jun 12 15:03:41 2019 +0200
@@ -5,5 +5,5 @@
<image name="tryton-info" xexpand="0" xfill="0"/>
<label string="Choose move to recreate" id="choose"
yalign="0.0" xalign="0.0" xexpand="1"/>
- <field name="recreate_moves" colspan="2" widget="multiselection"/>
+ <field name="recreate_moves" colspan="2"/>
</form>

36
series
View File

@ -1,36 +1,38 @@
babi_multiprocess.diff # [trytond] babi multiprocess
trytond_test_database.diff # [trytond] avoid errors on upgrades from version 3.4
logging_jsonrpc_exeption.diff # [trytond] logging JSONRPC Exception
account_payment_view.diff # [account_payment]
issue3932.diff # [account] rule account move and account move line by company
# issue8421.diff # [account] set necessary attributes when generate keyword view
account_asset.diff # [account_asset] check if exist asset_lines
issue6253.diff # [account_invoice] add invoice type criteria
issue4506.diff # [account_invoice] Add credit invoices keyword from account.invoice
issue8479.diff # [account_invoice] missing invoice payment method rule by company
create_invoice_credit_with_refund.diff # [account_invoice] revert the creation of a credit invoice whith refund change. reconcile the 2 invoices, not cancell the origin one.
issue8618.diff # [account_invoice] Allow changing amount in manual invoice taxes
issue4030.diff # [analytic_account] Not selected root accounts in analytic account lines
analitic_line_company_rules.diff # [analytic_account] Not selected root accounts in analytic account lines
sale_list_price.diff # [sale] Can't convert to currency with list price is null (multicompany)
sale_supply_supply_on_sale_multivalue.diff # [sale_supply] supply_on_sale field multvalue #035100
lock_stock_move.diff # [stock] Function to overwrite if lock table or not
#sale_remove_multiselection.diff # [sale] remove multiselection handling exceptions
sale_copy.diff # [sale] set _cache fields to null when copy
#purchase_remove_multiselection.diff # [purchase] remove multiselection handling exceptions
issue4482.diff # [stock] stock inventory misses company access rule
search_warehouse.diff # [stock] search function for warehouse
issue239_630.diff # [stock] get location quantity by product, product template or lot
issue53451002_1_10001.diff # [stock] Allow configuring which quantity is grouped in compute_quantities_query() needed by stock_number_of_packages
# stock_quantity_to_zero.diff # [stock] Ensure to sum with value.
# improve_performance_on_try_assign.diff # [stock] change browse of product to get default_uom to pysql
stock_lot_sled.diff # [stock_lot_sled] Allow configuring which quantity is grouped in compute_quantities_query() needed by stock_number_of_packages
# issue8394.diff # [stock_lot_sled] Allow configuring which quantity is grouped in compute_quantities_query() needed by stock_number_of_packages
stock_quantity_to_zero.diff # [stock] Ensure to sum with value.
issue10467.diff # [stock_lot] add lot to grouping when assign try if lot it's required on product
party_identifier_migration.diff # [Party] avoid errors on upgrades
# production_view.diff [production] Split inputs and outputs on pages
# issue8413.diff [carrier] Add recname to search
sale_remove_multiselection.diff # [sale] remove multiselection handling exceptions.
account_asset.diff # [account_asset] check if exist asset_lines
issue8699.diff # [product_cost_fifo] Cost price increases when no quantity FIFO
production_view.diff #[production] Split inputs and outputs on pages
issue8703.diff # [stock_forecast] stock_forecast creates moves in the past
issue8702.diff # [stock_supply_forecast] Support production forecast
sale_allow_group_shipments_with_different_dates.diff # [sale_shipment_grouping] Deletes the grouping condition by dates
#improve_performance_on_try_assign.diff # [stock] change browse of product to get default_uom to pysql
#issue53451002_1_10001.diff # [stock] Allow configuring which quantity is grouped in compute_quantities_query() needed by stock_number_of_packages Issue7805 (only needed by stock_number_of_packages)
#stock_lot_sled.diff # [stock_lot_sled] Allow configuring which quantity is grouped in compute_quantities_query() needed by stock_number_of_packages

View File

@ -16,7 +16,7 @@ diff -r 0d630a58366a stock.py
query = super(Move, cls).compute_quantities_query(
location_ids, with_childs=with_childs, grouping=grouping,
- grouping_filter=grouping_filter)
+ grouping_filter=grouping_filter, quantity_field='internal_quantity')
+ grouping_filter=grouping_filter, quantity_field=quantity_field)
context = Transaction().context
today = Date.today()

View File

@ -0,0 +1,11 @@
diff -r 56fa7c97d5b7 move.py
--- a/trytond/trytond/modules/stock/move.py Thu Jun 06 10:24:15 2019 +0200
+++ b/trytond/trytond/modules/stock/move.py Thu Jun 06 10:25:02 2019 +0200
@@ -1346,7 +1346,7 @@
location = line[0]
key = tuple(line[1:-1])
quantity = line[-1]
- quantities[(location,) + key] += quantity
+ quantities[(location,) + key] += quantity or 0
ids.add(id_getter(line))
keys.add(key)