[MERGE] forward port branch saas-11 up to 0304bf8
This commit is contained in:
@@ -650,8 +650,9 @@ class AccountBankStatementLine(models.Model):
|
||||
# Look for a single move line with the same amount
|
||||
field = currency and 'amount_residual_currency' or 'amount_residual'
|
||||
liquidity_field = currency and 'amount_currency' or amount > 0 and 'debit' or 'credit'
|
||||
liquidity_amt_clause = currency and '%(amount)s' or 'abs(%(amount)s)'
|
||||
sql_query = self._get_common_sql_query(excluded_ids=excluded_ids) + \
|
||||
" AND ("+field+" = %(amount)s OR (acc.internal_type = 'liquidity' AND "+liquidity_field+" = %(amount)s)) \
|
||||
" AND ("+field+" = %(amount)s OR (acc.internal_type = 'liquidity' AND "+liquidity_field+" = " + liquidity_amt_clause + ")) \
|
||||
ORDER BY date_maturity asc, aml.id asc LIMIT 1"
|
||||
self.env.cr.execute(sql_query, params)
|
||||
results = self.env.cr.fetchone()
|
||||
|
||||
@@ -141,6 +141,7 @@
|
||||
<field name="uom_id" ref="product.product_uom_kgm" />
|
||||
<field name="uom_po_id" ref="product.product_uom_kgm" />
|
||||
<field name="image" type="base64" file="point_of_sale/static/img/peche-image.jpg"/>
|
||||
<field name="taxes_id" eval='[(5,)]'/> <!-- no taxes -->
|
||||
</record>
|
||||
|
||||
<record id="raisins_noir" model="product.product">
|
||||
|
||||
@@ -108,6 +108,15 @@ class PickingType(models.Model):
|
||||
res.append((picking_type.id, name))
|
||||
return res
|
||||
|
||||
@api.model
|
||||
def name_search(self, name, args=None, operator='ilike', limit=100):
|
||||
args = args or []
|
||||
domain = []
|
||||
if name:
|
||||
domain = ['|', ('name', operator, name), ('warehouse_id.name', operator, name)]
|
||||
picks = self.search(domain + args, limit=limit)
|
||||
return picks.name_get()
|
||||
|
||||
@api.onchange('code')
|
||||
def onchange_picking_code(self):
|
||||
if self.code == 'incoming':
|
||||
|
||||
@@ -132,14 +132,13 @@ class ir_http(orm.AbstractModel):
|
||||
langs = [lg[0] for lg in request.website.get_languages()]
|
||||
path = request.httprequest.path.split('/')
|
||||
if first_pass:
|
||||
is_a_bot = self.is_a_bot()
|
||||
nearest_lang = not func and self.get_nearest_lang(path[1])
|
||||
url_lang = nearest_lang and path[1]
|
||||
preferred_lang = ((cook_lang if cook_lang in langs else False)
|
||||
or self.get_nearest_lang(request.lang)
|
||||
or (not is_a_bot and self.get_nearest_lang(request.lang))
|
||||
or request.website.default_lang_code)
|
||||
|
||||
is_a_bot = self.is_a_bot()
|
||||
|
||||
request.lang = request.context['lang'] = nearest_lang or preferred_lang
|
||||
# if lang in url but not the displayed or default language --> change or remove
|
||||
# or no lang in url, and lang to dispay not the default language --> add lang
|
||||
|
||||
@@ -243,7 +243,7 @@
|
||||
<h4 class="text-center text-muted"
|
||||
t-field="event.address_id" t-options='{
|
||||
"widget": "contact",
|
||||
"fields": ["address", "phone", "mobile", "fax"]
|
||||
"fields": ["name", "address", "phone", "mobile", "fax"]
|
||||
}'/>
|
||||
</t>
|
||||
</template>
|
||||
@@ -345,7 +345,7 @@
|
||||
</t>
|
||||
<div itemprop="location" class="mt16 mb8" t-field="event.address_id" t-options='{
|
||||
"widget": "contact",
|
||||
"fields": ["address", "phone", "mobile", "fax", "email"]
|
||||
"fields": ["name", "address", "phone", "mobile", "fax", "email"]
|
||||
}'/>
|
||||
</div>
|
||||
</div>
|
||||
@@ -512,7 +512,7 @@
|
||||
<i class="fa fa-clock-o"/> <span itemprop="startDate" t-esc="event.date_begin_located[:-3]"> </span> <i>to</i> <span itemprop="endDate" t-esc="event.date_end_located[:-3]"> </span>
|
||||
<div itemprop="location" class="mt16 mb8" t-field="event.address_id" t-options='{
|
||||
"widget": "contact",
|
||||
"fields": ["address", "phone", "mobile", "fax", "email"]
|
||||
"fields": ["name", "address", "phone", "mobile", "fax", "email"]
|
||||
}'/>
|
||||
</div>
|
||||
<div class="col-md-3 mt16">
|
||||
|
||||
@@ -82,11 +82,13 @@ def post_install(flag):
|
||||
class BaseCase(unittest.TestCase):
|
||||
"""
|
||||
Subclass of TestCase for common OpenERP-specific code.
|
||||
|
||||
|
||||
This class is abstract and expects self.registry, self.cr and self.uid to be
|
||||
initialized by subclasses.
|
||||
"""
|
||||
|
||||
longMessage = True # more verbose error message by default: https://www.odoo.com/r/Vmh
|
||||
|
||||
def cursor(self):
|
||||
return self.registry.cursor()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user