diff --git a/addons/account/models/account_invoice.py b/addons/account/models/account_invoice.py index 522d459a47b..6497da1c16f 100644 --- a/addons/account/models/account_invoice.py +++ b/addons/account/models/account_invoice.py @@ -1007,7 +1007,7 @@ class AccountInvoice(models.Model): return { 'date_maturity': line.get('date_maturity', False), 'partner_id': part, - 'name': line['name'][:64], + 'name': line['name'], 'debit': line['price'] > 0 and line['price'], 'credit': line['price'] < 0 and -line['price'], 'account_id': line['account_id'], diff --git a/addons/account/models/account_move.py b/addons/account/models/account_move.py index ca46bbb5612..76af8adff76 100644 --- a/addons/account/models/account_move.py +++ b/addons/account/models/account_move.py @@ -1443,7 +1443,7 @@ class AccountPartialReconcile(models.Model): company_id = fields.Many2one('res.company', related='debit_move_id.company_id', store=True, string='Currency') full_reconcile_id = fields.Many2one('account.full.reconcile', string="Full Reconcile", copy=False) max_date = fields.Date(string='Max Date of Matched Lines', compute='_compute_max_date', - readonly=True, copy=False, stored=True, + readonly=True, copy=False, store=True, help='Technical field used to determine at which date this reconciliation needs to be shown on the aged receivable/payable reports.') @api.multi diff --git a/addons/board/static/src/js/dashboard.js b/addons/board/static/src/js/dashboard.js index 844f529d998..7b8230e9e4d 100644 --- a/addons/board/static/src/js/dashboard.js +++ b/addons/board/static/src/js/dashboard.js @@ -20,7 +20,6 @@ FormView.include({ */ init: function (viewInfo) { this._super.apply(this, arguments); - this.rendererParams.noContentHelp = this.controllerParams.noContentHelp; this.controllerParams.viewID = viewInfo.view_id; }, }); @@ -236,6 +235,7 @@ FormRenderer.include({ var view = new View(viewInfo, { action: action, context: context, + domain: params.domain, groupBy: context.group_by, modelName: action.res_model, hasSelectors: false, diff --git a/addons/board/static/tests/dashboard_tests.js b/addons/board/static/tests/dashboard_tests.js index 1b55551fe2b..27d685ff46e 100644 --- a/addons/board/static/tests/dashboard_tests.js +++ b/addons/board/static/tests/dashboard_tests.js @@ -99,7 +99,7 @@ QUnit.test('display the no content helper', function (assert) { }); QUnit.test('basic functionality, with one sub action', function (assert) { - assert.expect(24); + assert.expect(25); var form = createView({ View: FormView, @@ -108,11 +108,11 @@ QUnit.test('basic functionality, with one sub action', function (assert) { arch: '
' + '' + '' + - '' + + '' + '' + '' + '
', - mockRPC: function (route) { + mockRPC: function (route, args) { if (route === '/web/action/load') { assert.step('load action'); return $.when({ @@ -120,6 +120,9 @@ QUnit.test('basic functionality, with one sub action', function (assert) { views: [[4, 'list']], }); } + if (route === '/web/dataset/search_read') { + assert.deepEqual(args.domain, [['foo', '!=', 'False']], "the domain should be passed"); + } if (route === '/board/static/src/img/layout_1-1-1.png') { return $.when(); } diff --git a/addons/crm/i18n/crm.pot b/addons/crm/i18n/crm.pot index 64fafb2c725..52c532aead2 100644 --- a/addons/crm/i18n/crm.pot +++ b/addons/crm/i18n/crm.pot @@ -3593,8 +3593,7 @@ msgstr "" #. module: crm #: model:ir.actions.act_window,help:crm.crm_opportunity_report_action_lead -msgid "This report analyses the source of your leads\n" -"(including those converted into opportunities)." +msgid "This report analyses the source of your leads." msgstr "" #. module: crm diff --git a/addons/crm/report/crm_opportunity_report_views.xml b/addons/crm/report/crm_opportunity_report_views.xml index 67254155822..7fe9c41ae0a 100644 --- a/addons/crm/report/crm_opportunity_report_views.xml +++ b/addons/crm/report/crm_opportunity_report_views.xml @@ -77,8 +77,8 @@ [('probability', '=', 100)] {'col_group_by': ['create_date:month'], 'group_by': ['country_id']} - - Expected Revenus by Team + + Expected Revenue by Team crm.opportunity.report {'group_by': ['create_date:month', 'team_id'], 'measures': ['expected_revenue', '__count']} @@ -191,13 +191,12 @@ with the the sales channel. crm.opportunity.report form pivot,graph - {'search_default_current': True, 'active_test': True} + {'search_default_current': True, 'active_test': True, 'search_default_lead': True} - This report analyses the source of your leads -(including those converted into opportunities). + This report analyses the source of your leads. ' + + '' + + '
' + + '
' + + '', + domain: [['id', '=', 239]], // no record will match this domain + mockRPC: function (route, args) { + if (args.method === 'retrieve_sales_dashboard') { + return $.when(dashboardData); + } + return this._super(route, args); + }, + viewOptions: { + action: { + help: '

A help message

', + }, + }, + }); + + assert.strictEqual(kanban.$('div.o_sales_dashboard').length, 1, + "should render the dashboard"); + assert.strictEqual(kanban.$('.oe_view_nocontent:contains(A help message)').length, 1, + "should correctly render the nocontent helper"); + + kanban.destroy(); +}); + }); diff --git a/addons/delivery/models/delivery_carrier.py b/addons/delivery/models/delivery_carrier.py index 17466f93ef7..4c1ecff878d 100644 --- a/addons/delivery/models/delivery_carrier.py +++ b/addons/delivery/models/delivery_carrier.py @@ -50,7 +50,7 @@ class DeliveryCarrier(models.Model): zip_to = fields.Char('Zip To') margin = fields.Integer(help='This percentage will be added to the shipping price.') - free_over = fields.Boolean('Free if order total is more than', help="If the order is more expensive than a certain amount, the customer can benefit from a free shipping", default=False, oldname='free_if_more_than') + free_over = fields.Boolean('Free if order amount is above', help="If the order total amount (shipping excluded) is above or equal to this value, the customer benefits from a free shipping", default=False, oldname='free_if_more_than') amount = fields.Float(string='Amount', help="Amount of the order to benefit from a free shipping, expressed in the company currency") _sql_constraints = [ @@ -122,7 +122,7 @@ class DeliveryCarrier(models.Model): res['price'] = res['price'] * (1.0 + (float(self.margin) / 100.0)) # free when order is large enough if res['success'] and self.free_over and order._compute_amount_total_without_delivery() >= self.amount: - res['warning_message'] = _('Warning:\nTotal amount of this order is over %.2f, free shipping!\n(actual cost: %.2f)') % (self.amount, res['price']) + res['warning_message'] = _('Info:\nTotal amount of this order is above %.2f, free shipping!\n(actual cost: %.2f)') % (self.amount, res['price']) res['price'] = 0.0 return res diff --git a/addons/delivery/models/delivery_grid.py b/addons/delivery/models/delivery_grid.py index 605f1da0ff6..dddc300dfe2 100644 --- a/addons/delivery/models/delivery_grid.py +++ b/addons/delivery/models/delivery_grid.py @@ -21,7 +21,7 @@ class PriceRule(models.Model): elif rule.list_price and not rule.list_base_price: name = '%s %s times %s' % (name, rule.list_price, rule.variable_factor) else: - name = '%s fixed price %s and %s times %s Extra' % (name, rule.list_base_price, rule.list_price, rule.variable_factor) + name = '%s fixed price %s plus %s times %s' % (name, rule.list_base_price, rule.list_price, rule.variable_factor) rule.name = name name = fields.Char(compute='_compute_name') @@ -50,7 +50,13 @@ class ProviderGrid(models.Model): 'error_message': _('Error: no matching grid.'), 'warning_message': False} - price_unit = self._get_price_available(order) + try: + price_unit = self._get_price_available(order) + except UserError as e: + return {'success': False, + 'price': 0.0, + 'error_message': e.name, + 'warning_message': False} if order.company_id.currency_id.id != order.pricelist_id.currency_id.id: price_unit = order.company_id.currency_id.with_context(date=order.date_order).compute(price_unit, order.pricelist_id.currency_id) @@ -91,7 +97,7 @@ class ProviderGrid(models.Model): criteria_found = True break if not criteria_found: - raise UserError(_("Selected product in the delivery method doesn't fulfill any of the delivery carrier(s) criteria.")) + raise UserError(_("No price rule matching this order; delivery cost cannot be computed.")) return price diff --git a/addons/delivery/views/delivery_view.xml b/addons/delivery/views/delivery_view.xml index 32eaa662481..ba906cb7b29 100644 --- a/addons/delivery/views/delivery_view.xml +++ b/addons/delivery/views/delivery_view.xml @@ -174,7 +174,7 @@ -