diff --git a/account_asset_update_asset.diff b/account_asset_update_asset.diff
index b185e88..f793560 100644
--- a/account_asset_update_asset.diff
+++ b/account_asset_update_asset.diff
@@ -1,13 +1,58 @@
-diff --git a/trytond/trytond/modules/account_asset/asset.py b/trytond/trytond/modules/account_asset/asset.py
-index cf5191f..385cbf1 100644
---- a/trytond/trytond/modules/account_asset/asset.py
-+++ b/trytond/trytond/modules/account_asset/asset.py
-@@ -823,7 +823,7 @@ class UpdateAsset(Wizard):
- Asset = Pool().get('account.asset')
- asset = Asset(Transaction().context['active_id'])
- return {
-- 'amount': self.start.value - asset.value,
-+ 'amount': Decimal(self.start.value) - asset.value,
- 'date': datetime.date.today(),
- 'depreciation_account': asset.product.account_depreciation_used.id,
- 'counterpart_account': asset.product.account_expense_used.id,
+diff --git a//trytond/trytond/modules/account_asset/asset.py b//trytond/trytond/modules/account_asset/asset.py
+index cf5191f..661982a 100644
+--- a//trytond/trytond/modules/account_asset/asset.py
++++ b//trytond/trytond/modules/account_asset/asset.py
+@@ -745,15 +745,32 @@ class CreateMoves(Wizard):
+ class UpdateAssetStart(ModelView):
+ 'Update Asset Start'
+ __name__ = 'account.asset.update.start'
+- value = fields.Numeric('Asset Value', required=True)
+- residual_value = fields.Numeric('Residual Value', required=True)
++ value = fields.Numeric('Asset Value',
++ digits=(16, Eval('currency_digits', 2)),
++ depends=['currency_digits'], required=True)
++ residual_value = fields.Numeric('Residual Value',
++ digits=(16, Eval('currency_digits', 2)),
++ depends=['currency_digits'], required=True)
+ end_date = fields.Date('End Date', required=True)
++ currency_digits = fields.Integer('Currency Digits', required=True)
++
++ @staticmethod
++ def default_currency_digits():
++ Asset = Pool().get('account.asset')
++
++ context = Transaction().context
++ active_id = context.get('active_id')
++ if active_id:
++ return Asset(active_id).currency_digits
++ return 2
+
+
+ class UpdateAssetShowDepreciation(ModelView):
+ 'Update Asset Show Depreciation'
+ __name__ = 'account.asset.update.show_depreciation'
+- amount = fields.Numeric('Amount', readonly=True)
++ amount = fields.Numeric('Amount',
++ digits=(16, Eval('currency_digits', 2)),
++ depends=['currency_digits'], readonly=True)
+ date = fields.Date('Date', required=True,
+ domain=[
+ ('date', '>', Eval('latest_move_date')),
+@@ -769,6 +786,17 @@ class UpdateAssetShowDepreciation(ModelView):
+ 'Depreciation Account', readonly=True)
+ counterpart_account = fields.Many2One('account.account',
+ 'Counterpart Account')
++ currency_digits = fields.Integer('Currency Digits', required=True)
++
++ @staticmethod
++ def default_currency_digits():
++ Asset = Pool().get('account.asset')
++
++ context = Transaction().context
++ active_id = context.get('active_id')
++ if active_id:
++ return Asset(active_id).currency_digits
++ return 2
+
+
+ class UpdateAsset(Wizard):
diff --git a/issue10500.diff b/issue10500.diff
new file mode 100644
index 0000000..ef2083d
--- /dev/null
+++ b/issue10500.diff
@@ -0,0 +1,22 @@
+diff --git a/invoice.py b/invoice.py
+index 582265d..1093bb3 100644
+--- a/trytond/trytond/modules/account_invoice/invoice.py
++++ b/trytond/trytond/modules/account_invoice/invoice.py
+@@ -1202,7 +1202,7 @@ class Invoice(Workflow, ModelSQL, ModelView, TaxableMixin):
+ gettext('account_invoice.msg_invoice_same_account_line',
+ account=self.account.rec_name,
+ invoice=self.rec_name,
+- line=line.rec_name))
++ lines=line.rec_name))
+
+ def check_payment_lines(self):
+ amount = sum(l.debit - l.credit for l in self.lines_to_pay)
+@@ -2121,7 +2121,7 @@ class InvoiceLine(sequence_ordered(), ModelSQL, ModelView, TaxableMixin):
+ gettext('account_invoice.msg_invoice_same_account_line',
+ account=self.account.rec_name,
+ invoice=self.invoice.rec_name,
+- line=self.rec_name))
++ lines=self.rec_name))
+
+ def _compute_taxes(self):
+ pool = Pool()
diff --git a/issue10680.diff b/issue10680.diff
new file mode 100644
index 0000000..db3bde2
--- /dev/null
+++ b/issue10680.diff
@@ -0,0 +1,14 @@
+diff --git a/product.py b/product.py
+--- a/trytond/trytond/modules/product/product.py
++++ b/trytond/trytond/modules/product/product.py
+@@ -282,6 +282,10 @@ class Product(
+
+ def get_template(self, name):
+ value = getattr(self.template, name)
++ if getattr(self.__class__, name)._type == 'reference':
++ if value:
++ return str(value)
++ return value
+ if isinstance(value, Model):
+ return value.id
+ elif (isinstance(value, (list, tuple))
\ No newline at end of file
diff --git a/issue8776.diff b/issue8776.diff
new file mode 100644
index 0000000..f9a07d3
--- /dev/null
+++ b/issue8776.diff
@@ -0,0 +1,29 @@
+diff --git a/trytond/trytond/tools/misc.py b/trytond/trytond/tools/misc.py
+index ee2763c9..300b5a72 100644
+--- a/trytond/trytond/tools/misc.py
++++ b/trytond/trytond/tools/misc.py
+@@ -12,6 +12,8 @@ import types
+ import io
+ import warnings
+ import importlib
++import re
++import unicodedata
+
+ from sql import Literal
+ from sql.operators import Or
+@@ -272,3 +274,15 @@ def rstrip_wildcard(string, wildcard='%', escape='\\'):
+ if new_string[-1] == escape:
+ return string
+ return new_string
++
++
++_slugify_strip_re = re.compile(r'[^\w\s-]')
++_slugify_hyphenate_re = re.compile(r'[-\s]+')
++
++
++def slugify(value, hyphenate='-'):
++ if not isinstance(value, str):
++ value = str(value)
++ value = unicodedata.normalize('NFKD', value)
++ value = str(_slugify_strip_re.sub('', value).strip())
++ return _slugify_hyphenate_re.sub(hyphenate, value)
diff --git a/issue9049-issue4050.diff b/issue9049-issue4050.diff
new file mode 100644
index 0000000..f1ae8eb
--- /dev/null
+++ b/issue9049-issue4050.diff
@@ -0,0 +1,197 @@
+diff --git a/trytond/trytond/modules/purchase/__init__.py b/trytond/trytond/modules/purchase/__init__.py
+index 5f548ca..db72ac1 100644
+--- a/trytond/trytond/modules/purchase/__init__.py
++++ b/trytond/trytond/modules/purchase/__init__.py
+@@ -36,6 +36,7 @@ def register():
+ Location,
+ party.Party,
+ party.CustomerCode,
++ purchase.ReturnPurchaseStart,
+ module='purchase', type_='model')
+ Pool.register(
+ PurchaseReport,
+@@ -47,4 +48,5 @@ def register():
+ party.PartyReplace,
+ party.PartyErase,
+ ModifyHeader,
++ purchase.ReturnPurchase,
+ module='purchase', type_='wizard')
+diff --git a/trytond/trytond/modules/purchase/locale/ca.po b/trytond/trytond/modules/purchase/locale/ca.po
+index b184206..e4e01be 100644
+--- a/trytond/trytond/modules/purchase/locale/ca.po
++++ b/trytond/trytond/modules/purchase/locale/ca.po
+@@ -526,6 +526,10 @@ msgctxt "model:ir.action,name:wizard_modify_header"
+ msgid "Modify Header"
+ msgstr "Modificar capçalera"
+
++msgctxt "model:ir.action,name:wizard_return_purchase"
++msgid "Return Purchase"
++msgstr "Retorna la compra"
++
+ msgctxt "model:ir.action,name:wizard_shipment_handle_exception"
+ msgid "Handle Shipment Exception"
+ msgstr "Gestiona l'excepció d'enviament"
+@@ -1015,6 +1019,10 @@ msgctxt "view:purchase.purchase:"
+ msgid "Purchase"
+ msgstr "Compra"
+
++msgctxt "view:purchase.return_purchase.start:"
++msgid "Are you sure to return these/this purchase(s)?"
++msgstr "Esteu segurs que voleu retornar aquesta/es compra/es?"
++
+ msgctxt "wizard_button:purchase.handle.invoice.exception,ask,end:"
+ msgid "Cancel"
+ msgstr "Cancel·la"
+diff --git a/trytond/trytond/modules/purchase/locale/es.po b/trytond/trytond/modules/purchase/locale/es.po
+index c48d0c8..497e5a3 100644
+--- a/trytond/trytond/modules/purchase/locale/es.po
++++ b/trytond/trytond/modules/purchase/locale/es.po
+@@ -529,6 +529,10 @@ msgctxt "model:ir.action,name:wizard_modify_header"
+ msgid "Modify Header"
+ msgstr "Modificar cabecera"
+
++msgctxt "model:ir.action,name:wizard_return_purchase"
++msgid "Return Purchase"
++msgstr "Devolver la compra"
++
+ msgctxt "model:ir.action,name:wizard_shipment_handle_exception"
+ msgid "Handle Shipment Exception"
+ msgstr "Gestionar excepción de envío"
+@@ -1018,6 +1022,10 @@ msgctxt "view:purchase.purchase:"
+ msgid "Purchase"
+ msgstr "Compra"
+
++msgctxt "view:purchase.return_purchase.start:"
++msgid "Are you sure to return these/this purchase(s)?"
++msgstr "¿Estás seguro de querer devolver este/os pedido/s de compra?"
++
+ msgctxt "wizard_button:purchase.handle.invoice.exception,ask,end:"
+ msgid "Cancel"
+ msgstr "Cancelar"
+diff --git a/trytond/trytond/modules/purchase/purchase.py b/trytond/trytond/modules/purchase/purchase.py
+index a0459a5..4e35105 100644
+--- a/trytond/trytond/modules/purchase/purchase.py
++++ b/trytond/trytond/modules/purchase/purchase.py
+@@ -175,6 +175,11 @@ class Purchase(Workflow, ModelSQL, ModelView, TaxableMixin):
+ invoices_recreated = fields.Many2Many(
+ 'purchase.purchase-recreated-account.invoice',
+ 'purchase', 'invoice', 'Recreated Invoices', readonly=True)
++ origin = fields.Reference('Origin', selection='get_origin', select=True,
++ states={
++ 'readonly': Eval('state') != 'draft',
++ },
++ depends=['state'])
+ delivery_date = fields.Date(
+ "Delivery Date",
+ states={
+@@ -575,6 +580,17 @@ class Purchase(Workflow, ModelSQL, ModelView, TaxableMixin):
+ self.write([self], {
+ 'shipment_state': state,
+ })
++ @classmethod
++ def _get_origin(cls):
++ "Return list of Model names for origin Reference"
++ return ['purchase.purchase']
++
++ @classmethod
++ def get_origin(cls):
++ Model = Pool().get('ir.model')
++ get_name = Model.get_name
++ models = cls._get_origin()
++ return [(None, '')] + [(m, get_name(m)) for m in models]
+
+ @property
+ def report_address(self):
+@@ -1864,3 +1880,37 @@ class ModifyHeader(Wizard):
+ Line.save(purchase.lines)
+
+ return 'end'
++
++
++class ReturnPurchaseStart(ModelView):
++ "Return Purchase"
++ __name__ = 'purchase.return_purchase.start'
++
++
++class ReturnPurchase(Wizard):
++ "Return Purchase"
++ __name__ = 'purchase.return_purchase'
++ start = StateView('purchase.return_purchase.start',
++ 'purchase.return_purchase_start_view_form', [
++ Button("Cancel", 'end', 'tryton-cancel'),
++ Button("Return", 'return_', 'tryton-ok', default=True),
++ ])
++ return_ = StateAction('purchase.act_purchase_form')
++
++ def do_return_(self, action):
++ Purchase = Pool().get('purchase.purchase')
++
++ purchases = Purchase.browse(Transaction().context['active_ids'])
++ return_purchases = Purchase.copy(purchases)
++ for return_purchase, purchase in zip(return_purchases, purchases):
++ return_purchase.origin = purchase
++ for line in return_purchase.lines:
++ if line.type == 'line':
++ line.quantity *= -1
++ return_purchase.lines = return_purchase.lines # Force saving
++ Purchase.save(return_purchases)
++
++ data = {'res_id': [s.id for s in return_purchases]}
++ if len(return_purchases) == 1:
++ action['views'].reverse()
++ return action, data
+diff --git a/trytond/trytond/modules/purchase/purchase.xml b/trytond/trytond/modules/purchase/purchase.xml
+index aef771b..97404cb 100644
+--- a/trytond/trytond/modules/purchase/purchase.xml
++++ b/trytond/trytond/modules/purchase/purchase.xml
+@@ -523,6 +523,22 @@ this repository contains the full copyright notices and license terms. -->
+ template_tree
+
+
++
++ purchase.return_purchase.start
++ form
++ return_purchase_start_form
++
++
++ Return Purchase
++ purchase.return_purchase
++ purchase.purchase
++
++
++ form_action
++ purchase.purchase,-1
++
++
++
+
+ Parties associated to Purchases
+ purchase.open_supplier
+diff --git a/trytond/trytond/modules/purchase/view/purchase_form.xml b/trytond/trytond/modules/purchase/view/purchase_form.xml
+index d689f5e..5f25f91 100644
+--- a/trytond/trytond/modules/purchase/view/purchase_form.xml
++++ b/trytond/trytond/modules/purchase/view/purchase_form.xml
+@@ -45,6 +45,8 @@ this repository contains the full copyright notices and license terms. -->
+
+
+
++
++
+
+
+
+diff --git a/trytond/trytond/modules/purchase/view/return_purchase_start_form.xml b/trytond/trytond/modules/purchase/view/return_purchase_start_form.xml
+new file mode 100644
+index 0000000..9a87dd8
+--- /dev/null
++++ b/trytond/trytond/modules/purchase/view/return_purchase_start_form.xml
+@@ -0,0 +1,9 @@
++
++
++
diff --git a/issue9122.diff b/issue9122.diff
new file mode 100644
index 0000000..eca2346
--- /dev/null
+++ b/issue9122.diff
@@ -0,0 +1,87 @@
+ diff --git a/trytond/trytond/modules/stock_supply/__init__.py b/trytond/trytond/modules/stock_supply/__init__.py
+ index 48ced90..0d646e9 100644
+ --- a/trytond/trytond/modules/stock_supply/__init__.py
+ +++ b/trytond/trytond/modules/stock_supply/__init__.py
+ @@ -8,6 +8,7 @@ from .purchase_request import *
+ from .shipment import *
+ from .location import *
+ from . import stock
+ +from . import ir
+
+
+ def register():
+ @@ -22,6 +23,7 @@ def register():
+ Location,
+ LocationLeadTime,
+ stock.StockSupplyStart,
+ + ir.Cron,
+ module='stock_supply', type_='model')
+ Pool.register(
+ stock.StockSupply,
+diff --git a/trytond/trytond/modules/stock_supply/ir.py b/trytond/trytond/modules/stock_supply/ir.py
+new file mode 100644
+index 0000000..27960e0
+--- /dev/null
++++ b/trytond/trytond/modules/stock_supply/ir.py
+@@ -0,0 +1,14 @@
++# The COPYRIGHT file at the top level of this repository contains the full
++# copyright notices and license terms.
++from trytond.pool import PoolMeta
++
++
++class Cron(metaclass=PoolMeta):
++ __name__ = 'ir.cron'
++
++ @classmethod
++ def __setup__(cls):
++ super().__setup__()
++ cls.method.selection.extend([
++ ('stock.order_point|supply_stock', "Supply Stock"),
++ ])
+diff --git a/trytond/trytond/modules/stock_supply/order_point.py b/trytond/trytond/modules/stock_supply/order_point.py
+index 78edc42..e310f0a 100644
+--- a/trytond/trytond/modules/stock_supply/order_point.py
++++ b/trytond/trytond/modules/stock_supply/order_point.py
+@@ -4,6 +4,7 @@ from sql import Null
+
+ from trytond.i18n import gettext
+ from trytond.model import ModelView, ModelSQL, fields
++from trytond.pool import Pool
+ from trytond.pyson import If, Equal, Eval, Not, In
+ from trytond.transaction import Transaction
+
+@@ -251,3 +252,11 @@ class OrderPoint(ModelSQL, ModelView):
+ @staticmethod
+ def default_company():
+ return Transaction().context.get('company')
++
++ @classmethod
++ def supply_stock(cls):
++ pool = Pool()
++ StockSupply = pool.get('stock.supply', type='wizard')
++ session_id, _, _ = StockSupply.create()
++ StockSupply.execute(session_id, {}, 'create_')
++ StockSupply.delete(session_id)
+diff --git a/trytond/trytond/modules/stock_supply/tests/scenario_stock_internal_supply.rst b/trytond/trytond/modules/stock_supply/tests/scenario_stock_internal_supply.rst
+index d1681fd..eed49a5 100644
+--- a/trytond/trytond/modules/stock_supply/tests/scenario_stock_internal_supply.rst
++++ b/trytond/trytond/modules/stock_supply/tests/scenario_stock_internal_supply.rst
+@@ -178,3 +178,18 @@ Execute internal supply::
+ 'Provisioning Location'
+ >>> move.to_location.name
+ 'Second Storage'
++
++Create stock_supply cron and execute it::
++
++ >>> Cron = Model.get('ir.cron')
++ >>> admin_user, = User.find([('login', '=', 'admin')])
++ >>> set_user(admin_user)
++ >>> shipment.delete()
++ >>> cron = Cron(method='stock.order_point|supply_stock')
++ >>> cron.interval_number = 1
++ >>> cron.interval_type = 'months'
++ >>> cron.click('run_once')
++ >>> shipment, = ShipmentInternal.find(
++ ... [('to_location', '=', sec_storage_loc.id)])
++ >>> shipment.state
++ 'request'
diff --git a/series b/series
index e500f26..50e1cd9 100644
--- a/series
+++ b/series
@@ -1,10 +1,11 @@
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
+issue8776.diff # [trytond] Add slugify tool
+
account_payment_view.diff # [account_payment]
account_payment_sepa_locale.diff # [account_payment_sepa]
-
issue3932.diff # [account] rule account move and account move line by company
issue6253.diff # [account_invoice] add invoice type criteria
@@ -98,3 +99,12 @@ issue10338.diff # [bank] Search on rec_name of other model in search_rec_name
issue9146.diff # [account_stock_landed_cost] Use field digits on secondary unit
issue4440.diff # [party_relationship] add start/end dates
+
+stock_lot_sled_ca_locale.diff # [stock_lot_sled] Fix wrong translation [#044921]
+issue9122.diff # [stock_supply] Add cron job to supply stock
+
+issue10500.diff # [account_invoice] Fix msg_invoice_same_account_line variables name
+
+issue9049-issue4050.diff # [purchase] Add origin and set on returned purchase + Add return wizard
+
+issue10680.diff # [product] Fix get_template in reference field case
diff --git a/stock_lot_sled_ca_locale.diff b/stock_lot_sled_ca_locale.diff
new file mode 100644
index 0000000..882b07d
--- /dev/null
+++ b/stock_lot_sled_ca_locale.diff
@@ -0,0 +1,13 @@
+diff --git a/locale/ca.po b/locale/ca.po
+index 3f35fe7..338625c 100644
+--- a/trytond/trytond/modules/stock_lot_sled/locale/ca.po
++++ b/trytond/trytond/modules/stock_lot_sled/locale/ca.po
+@@ -101,7 +101,7 @@ msgid ""
+ "You cannot close periods before the expiration of lot \"%(lot)s\" "
+ "(%(date)s)."
+ msgstr ""
+-"No podeu tancar períodes abans de l'expiració del lot \"%(lots)\" (%date)s)."
++"No podeu tancar períodes abans de l'expiració del lot \"%(lot)s\" (%(date)s)."
+
+ msgctxt "model:res.group,name:group_stock_force_expiration"
+ msgid "Stock Force Expiration"