[MERGE] forward port of branch 8.0 up to 34ce3e3
This commit is contained in:
@@ -600,9 +600,9 @@ class account_bank_statement_line(osv.osv):
|
||||
domain += [('reconcile_partial_id', '=', False)]
|
||||
domain += [('account_id.type', 'in', ((amount > 0 and 'receivable' or 'payable'), 'liquidity'))] # Make sure we can't mix receivable and payable
|
||||
if amount_field == 'amount_currency' and amount < 0:
|
||||
domain += [(amount_field, '<', 0), (amount_field, '>', (sign * amount))]
|
||||
domain += [(amount_field, '<', 0), (amount_field, '>=', (sign * amount))]
|
||||
else:
|
||||
domain += [(amount_field, '>', 0), (amount_field, '<', (sign * amount))]
|
||||
domain += [(amount_field, '>', 0), (amount_field, '<=', (sign * amount))]
|
||||
mv_lines = self.get_move_lines_for_reconciliation(cr, uid, st_line, excluded_ids=excluded_ids, limit=5, additional_domain=domain, context=context)
|
||||
ret = []
|
||||
total = 0
|
||||
|
||||
@@ -108,7 +108,7 @@ class account_move_line_reconcile_writeoff(osv.osv_memory):
|
||||
'writeoff_acc_id': fields.many2one('account.account','Write-Off account', required=True),
|
||||
'date_p': fields.date('Date'),
|
||||
'comment': fields.char('Comment', required=True),
|
||||
'analytic_id': fields.many2one('account.analytic.account', 'Analytic Account', domain=[('parent_id', '!=', False)]),
|
||||
'analytic_id': fields.many2one('account.analytic.account', 'Analytic Account', domain=[('type', '!=', 'view')]),
|
||||
}
|
||||
_defaults = {
|
||||
'date_p': lambda *a: time.strftime('%Y-%m-%d'),
|
||||
|
||||
@@ -6,8 +6,8 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Odoo Server 8.0\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2015-01-21 14:08+0000\n"
|
||||
"PO-Revision-Date: 2015-01-21 14:08+0000\n"
|
||||
"POT-Creation-Date: 2015-09-05 12:00+0000\n"
|
||||
"PO-Revision-Date: 2015-09-05 12:00+0000\n"
|
||||
"Last-Translator: <>\n"
|
||||
"Language-Team: \n"
|
||||
"MIME-Version: 1.0\n"
|
||||
@@ -43,3 +43,9 @@ msgstr ""
|
||||
msgid "Payment Transaction"
|
||||
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
-5
@@ -371,10 +371,8 @@ class sale_order(osv.osv):
|
||||
"""
|
||||
if context is None:
|
||||
context = {}
|
||||
journal_ids = self.pool.get('account.journal').search(cr, uid,
|
||||
[('type', '=', 'sale'), ('company_id', '=', order.company_id.id)],
|
||||
limit=1)
|
||||
if not journal_ids:
|
||||
journal_id = self.pool['account.invoice'].default_get(cr, uid, ['journal_id'], context=context)['journal_id']
|
||||
if not journal_id:
|
||||
raise UserError(_('Please define sales journal for this company: "%s" (id:%d).') % (order.company_id.name, order.company_id.id))
|
||||
invoice_vals = {
|
||||
'name': order.client_order_ref or '',
|
||||
@@ -383,7 +381,7 @@ class sale_order(osv.osv):
|
||||
'reference': order.client_order_ref or order.name,
|
||||
'account_id': order.partner_invoice_id.property_account_receivable.id,
|
||||
'partner_id': order.partner_invoice_id.id,
|
||||
'journal_id': journal_ids[0],
|
||||
'journal_id': journal_id,
|
||||
'invoice_line': [(6, 0, lines)],
|
||||
'currency_id': order.pricelist_id.currency_id.id,
|
||||
'comment': order.note,
|
||||
|
||||
@@ -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
|
||||
@@ -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
|
||||
@@ -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
|
||||
@@ -942,7 +942,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?
|
||||
|
||||
@@ -422,21 +422,8 @@ class ir_model_fields(osv.osv):
|
||||
# if set, *one* column can be renamed here
|
||||
column_rename = None
|
||||
|
||||
# field patches {model: {field_name: {prop_name: prop_value, ...}, ...}, ...}
|
||||
patches = defaultdict(lambda: defaultdict(dict))
|
||||
|
||||
# static table of properties
|
||||
model_props = [ # (our-name, fields.prop, set_fn)
|
||||
('field_description', 'string', tools.ustr),
|
||||
('required', 'required', bool),
|
||||
('readonly', 'readonly', bool),
|
||||
('domain', 'domain', eval),
|
||||
('size', 'size', int),
|
||||
('on_delete', 'ondelete', str),
|
||||
('translate', 'translate', bool),
|
||||
('select_level', 'index', lambda x: bool(int(x))),
|
||||
('selection', 'selection', eval),
|
||||
]
|
||||
# names of the models to patch
|
||||
patched_models = set()
|
||||
|
||||
if vals and ids:
|
||||
checked_selection = False # need only check it once, so defer
|
||||
@@ -478,12 +465,7 @@ class ir_model_fields(osv.osv):
|
||||
# We don't check the 'state', because it might come from the context
|
||||
# (thus be set for multiple fields) and will be ignored anyway.
|
||||
if obj is not None and field is not None:
|
||||
# find out which properties (per model) we need to update
|
||||
for field_name, prop_name, func in model_props:
|
||||
if field_name in vals:
|
||||
prop_value = func(vals[field_name])
|
||||
if getattr(field, prop_name) != prop_value:
|
||||
patches[obj][final_name][prop_name] = prop_value
|
||||
patched_models.add(obj._name)
|
||||
|
||||
# These shall never be written (modified)
|
||||
for column_name in ('model_id', 'model', 'state'):
|
||||
@@ -492,16 +474,17 @@ class ir_model_fields(osv.osv):
|
||||
|
||||
res = super(ir_model_fields,self).write(cr, user, ids, vals, context=context)
|
||||
|
||||
self.pool.clear_manual_fields()
|
||||
|
||||
if column_rename:
|
||||
obj, rename = column_rename
|
||||
cr.execute('ALTER TABLE "%s" RENAME COLUMN "%s" TO "%s"' % rename)
|
||||
# This is VERY risky, but let us have this feature:
|
||||
# we want to change the key of field in obj._fields and obj._columns
|
||||
field = obj._pop_field(rename[1])
|
||||
obj._add_field(rename[2], field)
|
||||
|
||||
if column_rename or patched_models:
|
||||
# setup models, this will reload all manual fields in registry
|
||||
self.pool.setup_models(cr, partial=(not self.pool.ready))
|
||||
|
||||
if patches:
|
||||
if patched_models:
|
||||
# We have to update _columns of the model(s) and then call their
|
||||
# _auto_init to sync the db with the model. Hopefully, since write()
|
||||
# was called earlier, they will be in-sync before the _auto_init.
|
||||
@@ -511,20 +494,12 @@ class ir_model_fields(osv.osv):
|
||||
select=vals.get('select_level', '0'),
|
||||
update_custom_fields=True,
|
||||
)
|
||||
|
||||
for obj, model_patches in patches.iteritems():
|
||||
for field_name, field_patches in model_patches.iteritems():
|
||||
# update field properties, and adapt corresponding column
|
||||
field = obj._fields[field_name]
|
||||
attrs = dict(field._attrs, **field_patches)
|
||||
obj._add_field(field_name, field.new(**attrs))
|
||||
|
||||
# update database schema
|
||||
self.pool.setup_models(cr, partial=(not self.pool.ready))
|
||||
for model_name in patched_models:
|
||||
obj = self.pool[model_name]
|
||||
obj._auto_init(cr, ctx)
|
||||
obj._auto_end(cr, ctx) # actually create FKs!
|
||||
|
||||
if column_rename or patches:
|
||||
if column_rename or patched_models:
|
||||
RegistryManager.signal_registry_change(cr.dbname)
|
||||
|
||||
return res
|
||||
|
||||
Reference in New Issue
Block a user