[MERGE] forward port of branch saas-6 up to 105b1c0014

This commit is contained in:
Denis Ledoux
2015-10-23 18:31:55 +02:00
14 changed files with 87 additions and 14 deletions
+1 -1
View File
@@ -70,7 +70,7 @@ class AccountMoveLineReconcileWriteoff(models.TransientModel):
writeoff_acc_id = fields.Many2one('account.account', string='Write-Off account', required=True, domain=[('deprecated', '=', False)])
date_p = fields.Date(string='Date', default=fields.Date.context_today)
comment = fields.Char(required=True, default='Write-off')
analytic_id = fields.Many2one('account.analytic.account', string='Analytic Account', domain=[('parent_id', '!=', False)])
analytic_id = fields.Many2one('account.analytic.account', string='Analytic Account')
@api.multi
def trans_rec_addendum(self):
@@ -85,3 +85,9 @@ msgstr ""
msgid "received data for reference %s"
msgstr ""
#. module: payment_transfer
#: code:addons/payment_transfer/models/payment_acquirer.py:19
#, python-format
msgid "Wire Transfer"
msgstr ""
@@ -16,7 +16,7 @@ class TransferPaymentAcquirer(osv.Model):
def _get_providers(self, cr, uid, context=None):
providers = super(TransferPaymentAcquirer, self)._get_providers(cr, uid, context=context)
providers.append(['transfer', 'Wire Transfer'])
providers.append(['transfer', _('Wire Transfer')])
return providers
def transfer_get_form_action_url(self, cr, uid, id, context=None):
+3 -3
View File
@@ -229,8 +229,8 @@ class SaleOrder(models.Model):
a clean extension chain).
"""
self.ensure_one()
journal_ids = self.env['account.journal'].search([('type', '=', 'sale'), ('company_id', '=', self.company_id.id)], limit=1)
if not journal_ids:
journal_id = self.env['account.invoice'].default_get(['journal_id'])['journal_id']
if not journal_id:
raise UserError(_('Please define an accounting sale journal for this company.'))
invoice_vals = {
'name': self.client_order_ref or '',
@@ -239,7 +239,7 @@ class SaleOrder(models.Model):
'reference': self.client_order_ref or self.name,
'account_id': self.partner_invoice_id.property_account_receivable_id.id,
'partner_id': self.partner_invoice_id.id,
'journal_id': journal_ids[0].id,
'journal_id': journal_id,
'currency_id': self.pricelist_id.currency_id.id,
'comment': self.note,
'payment_term_id': self.payment_term_id.id,
@@ -267,7 +267,8 @@ class stock_landed_cost(osv.osv):
if digits:
value = float_round(value, precision_digits=digits[1], rounding_method='UP')
value = min(value, line.price_unit - value_split)
fnc = min if line.price_unit > 0 else max
value = fnc(value, line.price_unit - value_split)
value_split += value
if valuation.id not in towrite_dict:
+2 -2
View File
@@ -655,11 +655,11 @@ class res_partner(osv.osv):
}
return urlplus('//maps.googleapis.com/maps/api/staticmap' , params)
def google_map_link(self, cr, uid, ids, zoom=8, context=None):
def google_map_link(self, cr, uid, ids, zoom=10, context=None):
partner = self.browse(cr, uid, ids[0], context=context)
params = {
'q': '%s, %s %s, %s' % (partner.street or '', partner.city or '', partner.zip or '', partner.country_id and partner.country_id.name_get()[0][1] or ''),
'z': 10
'z': zoom,
}
return urlplus('https://maps.google.com/maps' , params)
@@ -14,7 +14,11 @@
<!--
Update Email template to send right quote url
-->
</data>
<!-- Mails & quote templates is done in a NOUPDATE block
so users can freely customize/delete them -->
<data noupdate="1">
<record id="sale.email_template_edi_sale" model="mail.template">
<field name="body_html"><![CDATA[
<div style="font-family: 'Lucica Grande', Ubuntu, Arial, Verdana, sans-serif; font-size: 12px; color: rgb(34, 34, 34); background-color: #FFF; ">
@@ -150,11 +154,7 @@
</section>
</field>
</record>
</data>
<!-- Mail template is done in a NOUPDATE block
so users can freely customize/delete them -->
<data noupdate="1">
<!--Email template -->
<record id="email_template_edi_sale" model="mail.template">
<field name="name">Sales Order - Send by Email (Online Quote)</field>
+16
View File
@@ -0,0 +1,16 @@
Switzerland, 2015-08-18
Compassion Switzerland agrees to the terms of the Odoo Corporate Contributor License
Agreement v1.0.
I declare that I am authorized and able to make this agreement and sign this
declaration.
Signed,
Emanuel Cino ecino@compassion.ch https://github.com/CompassionCH
List of contributors:
Emanuel Cino ecino@compassion.ch https://github.com/ecino
+15
View File
@@ -0,0 +1,15 @@
Germany, 9-30-2015
Big Consulting GmbH agrees to the terms of the Odoo Corporate Contributor License Agreement v1.0.
I declare that I am authorized and able to make this agreement and sign this declaration.
Signed,
Thorsten Vocks thorsten.vocks@openbig.org https://github.com/tv-openbig
List of contributors:
Thorsten Vocks thorsten.vocks@openbig.org https://github.com/tv-openbig
Heike Vocks heike.vocks@openbig.org https://github.com/hv-openbig
Jan Dasenbrock jan.dasenbrock@openbig.org https://github.com/jd-openbig
+11
View File
@@ -0,0 +1,11 @@
China, 2015-10-01
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,
钟小华 Zhong Xiaohua mackz@sina.com or mackzxh@gmail.com https://github.com/MackZxh
+1 -1
View File
@@ -949,7 +949,7 @@ calendar view are:
``date_stop`` is provided records become movable (via drag and drop)
directly in the calendar
``date_delay``
alternative to ``date_end``, provides the duration of the event instead of
alternative to ``date_stop``, provides the duration of the event instead of
its end date
.. todo:: what's the unit? Does it allow moving the record?
@@ -337,6 +337,19 @@ class TestNewFields(common.TransactionCase):
self.assertEqual(discussion.name, 'Bar')
self.assertEqual(message.discussion_name, 'Bar')
# change discussion name via related field on several records
discussion1 = discussion.create({'name': 'X1'})
discussion2 = discussion.create({'name': 'X2'})
discussion1.participants = discussion2.participants = self.env.user
message1 = message.create({'discussion': discussion1.id})
message2 = message.create({'discussion': discussion2.id})
self.assertEqual(message1.discussion_name, 'X1')
self.assertEqual(message2.discussion_name, 'X2')
(message1 + message2).write({'discussion_name': 'X3'})
self.assertEqual(discussion1.name, 'X3')
self.assertEqual(discussion2.name, 'X3')
# search on related field, and check result
search_on_related = self.env['test_new_api.message'].search([('discussion_name', '=', 'Bar')])
search_on_regular = self.env['test_new_api.message'].search([('discussion.name', '=', 'Bar')])
+9
View File
@@ -153,6 +153,15 @@ def onchange(*args):
when one of the given fields is modified. The method is invoked on a
pseudo-record that contains the values present in the form. Field
assignments on that record are automatically sent back to the client.
The method may return a dictionary for changing field domains and pop up
a warning message, like in the old API::
return {
'domain': {'other_id': [('partner_id', '=', partner_id)]},
'warning': {'title': "Warning", 'message': "What is this?"},
}
"""
return lambda method: decorate(method, '_onchange', args)
+3 -1
View File
@@ -566,10 +566,12 @@ class Field(object):
def _inverse_related(self, records):
""" Inverse the related field ``self`` on ``records``. """
# store record values, otherwise they may be lost by cache invalidation!
record_value = {record: record[self.name] for record in records}
for record in records:
other, field = self.traverse_related(record)
if other:
other[field.name] = record[self.name]
other[field.name] = record_value[record]
def _search_related(self, records, operator, value):
""" Determine the domain to search on field ``self``. """