[MERGE] forward port branch 10.0 up to a487d7d397
This commit is contained in:
@@ -126,6 +126,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:
|
||||
|
||||
@@ -639,6 +639,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))
|
||||
|
||||
@@ -75,6 +75,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)
|
||||
|
||||
@@ -23,11 +23,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):
|
||||
|
||||
@@ -17,7 +17,10 @@
|
||||
<button string="New Quotation" name="%(sale_action_quotations_new)d" type="action" class="oe_highlight"
|
||||
context="{'search_default_partner_id': partner_id,
|
||||
'default_partner_id': partner_id,
|
||||
'default_team_id': team_id}"/>
|
||||
'default_team_id': team_id,
|
||||
'default_campaign_id': campaign_id,
|
||||
'default_medium_id': medium_id,
|
||||
'default_source_id': source_id}"/>
|
||||
</xpath>
|
||||
<button name="toggle_active" position="before">
|
||||
<button class="oe_stat_button" type="action"
|
||||
|
||||
@@ -38,10 +38,10 @@ class AccountAnalyticLine(models.Model):
|
||||
return {}
|
||||
unit_amount = values.get('unit_amount', 0.0) or self.unit_amount
|
||||
user_id = values.get('user_id') or self.user_id.id or self._default_user()
|
||||
user = self.env['res.users'].browse([user_id])
|
||||
project = values.get('project_id') and self.env['project.project'].browse([values['project_id']]) or self.project_id
|
||||
emp = self.env['hr.employee'].search([('user_id', '=', user_id)], limit=1)
|
||||
cost = emp and emp.timesheet_cost or 0.0
|
||||
uom = (emp or user).company_id.project_time_mode_id
|
||||
uom = project.company_id.project_time_mode_id
|
||||
# Nominal employee cost = 1 * company project UoM (project_time_mode_id)
|
||||
return {
|
||||
'amount': -unit_amount * cost,
|
||||
|
||||
@@ -779,8 +779,9 @@ class Picking(models.Model):
|
||||
else:
|
||||
moves = self.env['stock.move'].browse(move_ids)
|
||||
if self.env.context.get('no_state_change'):
|
||||
moves = moves.filtered(lambda m: m.reserved_quant_ids)
|
||||
moves.do_unreserve()
|
||||
moves.filtered(lambda m: m.reserved_quant_ids).do_unreserve()
|
||||
else:
|
||||
moves.do_unreserve()
|
||||
moves.action_assign(no_prepare=True)
|
||||
|
||||
@api.multi
|
||||
|
||||
@@ -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_BA","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
@@ -1177,10 +1177,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
@@ -6,7 +6,7 @@ feedparser==5.2.1
|
||||
gevent==1.1.2
|
||||
greenlet==0.4.10
|
||||
jcconv==0.2.3
|
||||
Jinja2==2.8
|
||||
Jinja2==2.8.1
|
||||
lxml==3.5.0
|
||||
Mako==1.0.4
|
||||
MarkupSafe==0.23
|
||||
|
||||
Reference in New Issue
Block a user