diff --git a/addons/stock/models/stock_picking.py b/addons/stock/models/stock_picking.py index 814d195a03b..cecf12763c2 100644 --- a/addons/stock/models/stock_picking.py +++ b/addons/stock/models/stock_picking.py @@ -325,11 +325,11 @@ class Picking(models.Model): .filtered(lambda move: move.state not in ['cancel', 'done'])\ .sorted(key=lambda move: (move.state == 'assigned' and 2) or (move.state == 'waiting' and 1) or 0) if self.move_type == 'one': - self.state = moves_todo[0].state + self.state = moves_todo[0].state or 'draft' elif moves_todo[0].state != 'assigned' and any(x.partially_available or x.state == 'assigned' for x in moves_todo): self.state = 'partially_available' else: - self.state = moves_todo[-1].state + self.state = moves_todo[-1].state or 'draft' @api.one @api.depends('move_lines.priority') @@ -607,9 +607,13 @@ class Picking(models.Model): forced_qties[move.product_id] = forced_qty for vals in picking._prepare_pack_ops(picking_quants, forced_qties): vals['fresh_record'] = False - PackOperation.create(vals) + PackOperation |= PackOperation.create(vals) # recompute the remaining quantities all at once self.do_recompute_remaining_quantities() + for pack in PackOperation: + pack.ordered_qty = sum( + pack.mapped('linked_move_operation_ids').mapped('move_id').filtered(lambda r: r.state != 'cancel').mapped('ordered_qty') + ) self.write({'recompute_pack_op': False}) @api.multi diff --git a/addons/stock/views/stock_move_views.xml b/addons/stock/views/stock_move_views.xml index a49dc87dd7c..3d92f99a3b4 100644 --- a/addons/stock/views/stock_move_views.xml +++ b/addons/stock/views/stock_move_views.xml @@ -157,6 +157,7 @@
+ diff --git a/addons/stock_account/report/stock_history.py b/addons/stock_account/report/stock_history.py index ccf150954dc..4d5d4045dfb 100644 --- a/addons/stock_account/report/stock_history.py +++ b/addons/stock_account/report/stock_history.py @@ -41,7 +41,7 @@ class StockHistory(models.Model): self._cr.execute("""SELECT DISTINCT ON (product_id, company_id) product_id, company_id, cost FROM product_price_history WHERE product_id in %s AND datetime <= %s - ORDER BY product_id, company_id, datetime DESC""", (tuple(not_real_cost_method_products.ids), date)) + ORDER BY product_id, company_id, datetime DESC, id DESC""", (tuple(not_real_cost_method_products.ids), date)) for history in self._cr.dictfetchall(): histories_dict[(history['product_id'], history['company_id'])] = history['cost'] diff --git a/addons/website_crm/controllers/main.py b/addons/website_crm/controllers/main.py index 0782c760a62..308f857ab0c 100644 --- a/addons/website_crm/controllers/main.py +++ b/addons/website_crm/controllers/main.py @@ -50,19 +50,19 @@ class WebsiteCrmBackend(WebsiteBackend): 'graph': [ { 'values': leads_graph, - 'key': 'Leads', + 'key': _('Leads'), }, { 'values': previous_leads_graph, - 'key': 'Previous Leads', + 'key': _('Previous Leads'), }, ], 'leads': leads, 'lead_fields': { - 'create_date': 'Create Date', - 'campaign_id': 'Campaign', - 'medium_id': 'Medium', - 'source_id': 'Source', + 'create_date': _('Create Date'), + 'campaign_id': _('Campaign'), + 'medium_id': _('Medium'), + 'source_id': _('Source'), }, } diff --git a/addons/website_sale/controllers/backend.py b/addons/website_sale/controllers/backend.py index 53bd7054e97..8da7686b417 100644 --- a/addons/website_sale/controllers/backend.py +++ b/addons/website_sale/controllers/backend.py @@ -58,11 +58,11 @@ class WebsiteSaleBackend(WebsiteBackend): 'graph': [ { 'values': sales_graph, - 'key': 'Sales', + 'key': _('Sales'), }, { 'values': previous_sales_graph, - 'key': 'Previous Sales', + 'key': _('Previous Sales'), }, ], 'best_sellers': best_sellers, diff --git a/doc/cla/individual/piemar1.md b/doc/cla/individual/piemar1.md new file mode 100644 index 00000000000..06c857427ca --- /dev/null +++ b/doc/cla/individual/piemar1.md @@ -0,0 +1,9 @@ +Poland, 2017-06-25 + +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, + +Marcin PieczyƄski marcin-pieczynski@wp.pl https://github.com/piemar1 diff --git a/doc/howtos/backend.rst b/doc/howtos/backend.rst index 924dfbfa1bc..575cb23e3ae 100644 --- a/doc/howtos/backend.rst +++ b/doc/howtos/backend.rst @@ -1120,6 +1120,11 @@ default and behave as booleans (they can only be enabled by default). Gantt ----- +.. warning:: + + The gantt view requires the web_gantt module which is present in + :ref:`the enterprise edition ` version. + Horizontal bar charts typically used to show project planning and advancement, their root element is ````.