[MERGE] forward port branch saas-15 up to 52e88036f2
This commit is contained in:
@@ -127,6 +127,9 @@ class IrModelFieldsAnonymizeWizard(models.TransientModel):
|
||||
@api.multi
|
||||
def anonymize_database(self):
|
||||
"""Sets the 'anonymized' state to defined fields"""
|
||||
# pylint: disable=W0101
|
||||
raise UserError("""The Odoo Migration Platform no longer accepts anonymized databases.\n
|
||||
If you wish for your data to remain private during migration, please contact us at upgrade@odoo.com""")
|
||||
self.ensure_one()
|
||||
|
||||
# create a new history record:
|
||||
|
||||
@@ -699,6 +699,8 @@ class Lead(models.Model):
|
||||
@api.model
|
||||
def _get_duplicated_leads_by_emails(self, partner_id, email, include_lost=False):
|
||||
""" Search for opportunities that have the same partner and that arent done or cancelled """
|
||||
if not email:
|
||||
return []
|
||||
partner_match_domain = []
|
||||
for email in set(email_split(email) + [email]):
|
||||
partner_match_domain.append(('email_from', '=ilike', email))
|
||||
|
||||
@@ -81,6 +81,9 @@ class SaleOrder(models.Model):
|
||||
|
||||
def _create_delivery_line(self, carrier, price_unit):
|
||||
SaleOrderLine = self.env['sale.order.line']
|
||||
if self.partner_id:
|
||||
# set delivery detail in the customer language
|
||||
carrier = carrier.with_context(lang=self.partner_id.lang)
|
||||
|
||||
# Apply fiscal position
|
||||
taxes = carrier.product_id.taxes_id.filtered(lambda t: t.company_id.id == self.company_id.id)
|
||||
|
||||
@@ -27,11 +27,12 @@ class AccountInvoice(models.Model):
|
||||
purchase_line_ids = self.invoice_line_ids.mapped('purchase_line_id')
|
||||
purchase_ids = self.invoice_line_ids.mapped('purchase_id').filtered(lambda r: r.order_line <= purchase_line_ids)
|
||||
|
||||
result['domain'] = {'purchase_id': [
|
||||
('invoice_status', '=', 'to invoice'),
|
||||
('partner_id', 'child_of', self.partner_id.id),
|
||||
('id', 'not in', purchase_ids.ids),
|
||||
]}
|
||||
domain = [('invoice_status', '=', 'to invoice')]
|
||||
if self.partner_id:
|
||||
domain += [('partner_id', 'child_of', self.partner_id.id)]
|
||||
if purchase_ids:
|
||||
domain += [('id', 'not in', purchase_ids.ids)]
|
||||
result['domain'] = {'purchase_id': domain}
|
||||
return result
|
||||
|
||||
def _prepare_invoice_line_from_po_line(self, line):
|
||||
|
||||
@@ -38,3 +38,4 @@ Raúl Martín raul.martin@braintec-group.com https://github.com/BT-rmartin
|
||||
Silvan Wyden silvan.wyden@braintec-group.com https://github.com/BT-swyden
|
||||
Timka Piric Muratovic timka.piric@braintec-group.com https://github.com/BT-tpiric
|
||||
Pascal Zenklusen pascal.zenklusen@braintec-group.com https://github.com/BT-pzenklusen
|
||||
Nadal Francisco Garcia nadal.francisco@braintec-group.com https://github.com/BT-nfrancisco
|
||||
@@ -0,0 +1,11 @@
|
||||
Italy, 2018-08-08
|
||||
|
||||
I hereby agree to the terms of the Odoo Individual Contributor License
|
||||
Agreement v1.0.
|
||||
|
||||
I declare that I am authorized and able to make this agreement and sign this
|
||||
declaration.
|
||||
|
||||
Signed,
|
||||
|
||||
Marco Calcagni mcalcagni@dinamicheaziendali.it https://github.com/As400it
|
||||
@@ -6,9 +6,9 @@
|
||||
"base.lang_bs_BA","Bosnian / bosanski jezik","bs_BA","bs","Left-to-Right","[]",",",,"%d.%m.%Y","%H:%M:%S","True"
|
||||
"base.lang_bg","Bulgarian / български език","bg_BG","bg","Left-to-Right","[3,0]",",",,"%d.%m.%Y","%H,%M,%S","True"
|
||||
"base.lang_ca_ES","Catalan / Català","ca_ES","ca_ES","Left-to-Right","[3,0]",",",".","%d/%m/%Y","%H:%M:%S","True"
|
||||
"base.lang_zh_CN","Chinese (CN) / 简体中文","zh_CN","zh_CN","Left-to-Right","[3,0]",".",",","%Y年%m月%d日","%H时%M分%S秒","True"
|
||||
"base.lang_zh_CN","Chinese (Simplified) / 简体中文","zh_CN","zh_CN","Left-to-Right","[3,0]",".",",","%Y年%m月%d日","%H时%M分%S秒","True"
|
||||
"base.lang_zh_HK","Chinese (HK)","zh_HK","zh_HK","Left-to-Right","[3,0]",".",",","%Y年%m月%d日 %A","%I時%M分%S秒","True"
|
||||
"base.lang_zh_TW","Chinese (TW) / 正體字","zh_TW","zh_TW","Left-to-Right","[3,0]",".",",","%Y年%m月%d日","%H時%M分%S秒","True"
|
||||
"base.lang_zh_TW","Chinese (Traditional) / 正體字","zh_TW","zh_TW","Left-to-Right","[3,0]",".",",","%Y年%m月%d日","%H時%M分%S秒","True"
|
||||
"base.lang_hr","Croatian / hrvatski jezik","hr_HR","hr","Left-to-Right","[]",",",,"%d.%m.%Y","%H:%M:%S","True"
|
||||
"base.lang_cs_CZ","Czech / Čeština","cs_CZ","cs_CZ","Left-to-Right","[3,0]",","," ","%d.%m.%Y","%H:%M:%S","True"
|
||||
"base.lang_da_DK","Danish / Dansk","da_DK","da_DK","Left-to-Right","[3,0]",",",".","%d-%m-%Y","%H:%M:%S","True"
|
||||
|
||||
|
@@ -46,6 +46,10 @@ class RedirectWarning(Exception):
|
||||
:param string button_text: text to put on the button that will trigger
|
||||
the redirection.
|
||||
"""
|
||||
# using this RedirectWarning won't crash if used as an except_orm
|
||||
@property
|
||||
def name(self):
|
||||
return self.args[0]
|
||||
|
||||
|
||||
class AccessDenied(Exception):
|
||||
|
||||
+1
-4
@@ -1078,10 +1078,7 @@ def formatLang(env, value, digits=None, grouping=True, monetary=False, dp=False,
|
||||
return ''
|
||||
|
||||
lang = env.context.get('lang') or env.user.company_id.partner_id.lang or 'en_US'
|
||||
lang_objs = env['res.lang'].search([('code', '=', lang)])
|
||||
if not lang_objs:
|
||||
lang_objs = env['res.lang'].search([], limit=1)
|
||||
lang_obj = lang_objs[0]
|
||||
lang_obj = env['res.lang']._lang_get(lang)
|
||||
|
||||
res = lang_obj.format('%.' + str(digits) + 'f', value, grouping=grouping, monetary=monetary)
|
||||
|
||||
|
||||
+1
-1
@@ -8,7 +8,7 @@ gevent==1.3.4 ; sys_platform != 'win32' and python_version >= '3.7'
|
||||
greenlet==0.4.10 ; python_version < '3.7'
|
||||
greenlet==0.4.13 ; python_version >= '3.7'
|
||||
html2text==2016.9.19
|
||||
Jinja2==2.8
|
||||
Jinja2==2.8.1
|
||||
lxml==3.7.1 ; sys_platform != 'win32' and python_version < '3.7'
|
||||
lxml==4.2.3 ; sys_platform != 'win32' and python_version >= '3.7'
|
||||
lxml ; sys_platform == 'win32'
|
||||
|
||||
Reference in New Issue
Block a user