[MERGE] forward port branch saas-15 up to b7f35428f4
This commit is contained in:
@@ -2143,6 +2143,12 @@ msgstr ""
|
||||
msgid "Bank Statement"
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
#: code:addons/account/models/account_bank_statement.py:935
|
||||
#, python-format
|
||||
msgid "Bank Statement %s"
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
#: model:ir.model,name:account.model_account_bank_statement_line
|
||||
msgid "Bank Statement Line"
|
||||
|
||||
@@ -934,7 +934,7 @@ class AccountBankStatementLine(models.Model):
|
||||
'currency_id': currency.id,
|
||||
'amount': abs(total),
|
||||
'communication': self._get_communication(payment_methods[0] if payment_methods else False),
|
||||
'name': self.statement_id.name,
|
||||
'name': self.statement_id.name or _("Bank Statement %s") % self.date,
|
||||
})
|
||||
|
||||
# Complete dicts to create both counterpart move lines and write-offs
|
||||
|
||||
@@ -1361,7 +1361,7 @@ class AccountMoveLine(models.Model):
|
||||
raise UserError(_('You cannot do this modification on a reconciled entry. You can just change some non legal fields or you must unreconcile first.\n%s.') % err_msg)
|
||||
if line.move_id.id not in move_ids:
|
||||
move_ids.add(line.move_id.id)
|
||||
self.env['account.move'].browse(list(move_ids))._check_lock_date()
|
||||
self.env['account.move'].browse(list(move_ids))._check_lock_date()
|
||||
return True
|
||||
|
||||
####################################################
|
||||
|
||||
@@ -585,7 +585,6 @@ class SaleOrder(models.Model):
|
||||
for tax in line.tax_id:
|
||||
group = tax.tax_group_id
|
||||
res.setdefault(group, {'amount': 0.0, 'base': 0.0})
|
||||
# FORWARD-PORT UP TO SAAS-17
|
||||
for t in taxes:
|
||||
if t['id'] == tax.id or t['id'] in tax.children_tax_ids.ids:
|
||||
res[group]['amount'] += t['amount']
|
||||
|
||||
@@ -6756,6 +6756,12 @@ msgstr ""
|
||||
msgid "You cannot delete a scrap which is done."
|
||||
msgstr ""
|
||||
|
||||
#. module: stock
|
||||
#: code:addons/stock/models/stock_inventory.py:103
|
||||
#, python-format
|
||||
msgid "You cannot delete a validated inventory adjustement."
|
||||
msgstr ""
|
||||
|
||||
#. module: stock
|
||||
#: code:addons/stock/models/stock_inventory.py:386
|
||||
#, python-format
|
||||
|
||||
@@ -97,6 +97,13 @@ class Inventory(models.Model):
|
||||
else:
|
||||
self.total_qty = 0
|
||||
|
||||
@api.multi
|
||||
def unlink(self):
|
||||
for inventory in self:
|
||||
if inventory.state == 'done':
|
||||
raise UserError(_('You cannot delete a validated inventory adjustement.'))
|
||||
return super(Inventory, self).unlink()
|
||||
|
||||
@api.model
|
||||
def _selection_filter(self):
|
||||
""" Get the list of filter allowed according to the options checked
|
||||
|
||||
@@ -254,7 +254,6 @@ class ProductProduct(models.Model):
|
||||
]
|
||||
return []
|
||||
|
||||
@api.model
|
||||
def _get_anglo_saxon_price_unit(self, uom=False):
|
||||
price = self.standard_price
|
||||
if not self or not uom or self.uom_id.id == uom.id:
|
||||
|
||||
@@ -261,13 +261,12 @@ class AdjustmentLines(models.Model):
|
||||
product_id = fields.Many2one('product.product', 'Product', required=True)
|
||||
quantity = fields.Float(
|
||||
'Quantity', default=1.0,
|
||||
digits=dp.get_precision('Product Unit of Measure'), required=True)
|
||||
digits=0, required=True)
|
||||
weight = fields.Float(
|
||||
'Weight', default=1.0,
|
||||
digits=dp.get_precision('Product Unit of Measure'))
|
||||
digits=dp.get_precision('Stock Weight'))
|
||||
volume = fields.Float(
|
||||
'Volume', default=1.0,
|
||||
digits=dp.get_precision('Product Unit of Measure'))
|
||||
'Volume', default=1.0)
|
||||
former_cost = fields.Float(
|
||||
'Former Cost', digits=dp.get_precision('Product Price'))
|
||||
former_cost_per_unit = fields.Float(
|
||||
|
||||
Reference in New Issue
Block a user