diff options
| author | Christophe Simonis <chs@odoo.com> | 2016-02-02 13:18:33 +0100 |
|---|---|---|
| committer | Christophe Simonis <chs@odoo.com> | 2016-02-02 13:18:33 +0100 |
| commit | fbd5fab238e85958da1e6a0f63a1c22de3ba17e9 (patch) | |
| tree | bc5623c70022497e75dfbffb418eb631b67fba2f /addons | |
| parent | c736058e901ef43bb5ccb37abd4ba697197d23d4 (diff) | |
| parent | 9ca7ad87b2bd06c4fae5d3428e2262eacf9fdb60 (diff) | |
[MERGE] forward port of branch saas-6 up to 9ca7ad8
Diffstat (limited to 'addons')
| -rw-r--r-- | addons/account/views/account_view.xml | 2 | ||||
| -rw-r--r-- | addons/delivery/models/sale_order.py | 3 | ||||
| -rw-r--r-- | addons/pos_restaurant/static/src/js/notes.js | 2 | ||||
| -rw-r--r-- | addons/sale_margin/sale_margin.py | 2 | ||||
| -rw-r--r-- | addons/stock/stock.py | 6 | ||||
| -rw-r--r-- | addons/web/static/src/xml/base.xml | 12 |
6 files changed, 14 insertions, 13 deletions
diff --git a/addons/account/views/account_view.xml b/addons/account/views/account_view.xml index f0eccf50041..e2e5eadbdfe 100644 --- a/addons/account/views/account_view.xml +++ b/addons/account/views/account_view.xml @@ -543,7 +543,7 @@ <page string="Transactions" name="statement_line_ids"> <field name="line_ids" context="{'date':date}"> <tree editable="bottom" string="Statement lines" decoration-muted="journal_entry_ids"> - <field name="sequence" readonly="1" invisible="1"/> + <field name="sequence" widget="handle"/> <field name="journal_entry_ids" invisible="1"/> <field name="date" attrs="{'readonly' : [('journal_entry_ids', '!=', [])] }"/> <field name="ref" attrs="{'readonly' : [('journal_entry_ids', '!=', [])] }"/> diff --git a/addons/delivery/models/sale_order.py b/addons/delivery/models/sale_order.py index 93886a5582f..50cebb1da75 100644 --- a/addons/delivery/models/sale_order.py +++ b/addons/delivery/models/sale_order.py @@ -92,7 +92,8 @@ class SaleOrder(models.Model): } if self.order_line: values['sequence'] = self.order_line[-1].sequence + 1 - SaleOrderLine.create(values) + so = SaleOrderLine.create(values) + so.product_id_change_margin() class SaleOrderLine(models.Model): diff --git a/addons/pos_restaurant/static/src/js/notes.js b/addons/pos_restaurant/static/src/js/notes.js index 5ed562081fe..d5dfe8e23e9 100644 --- a/addons/pos_restaurant/static/src/js/notes.js +++ b/addons/pos_restaurant/static/src/js/notes.js @@ -26,7 +26,7 @@ models.Orderline = models.Orderline.extend({ if (orderline.get_note() !== this.get_note()) { return false; } else { - return _super_orderline.can_be_merged_with.call(this,orderline); + return _super_orderline.can_be_merged_with.apply(this,arguments); } }, clone: function(){ diff --git a/addons/sale_margin/sale_margin.py b/addons/sale_margin/sale_margin.py index 7c24f9a50b6..12398dce41e 100644 --- a/addons/sale_margin/sale_margin.py +++ b/addons/sale_margin/sale_margin.py @@ -61,7 +61,7 @@ class sale_order(osv.osv): _columns = { 'margin': fields.function(_product_margin, string='Margin', help="It gives profitability by calculating the difference between the Unit Price and the cost.", store={ - 'sale.order.line': (_get_order, ['margin', 'purchase_price'], 20), + 'sale.order.line': (_get_order, ['margin', 'purchase_price', 'order_id'], 20), 'sale.order': (lambda self, cr, uid, ids, c={}: ids, ['order_line'], 20), }, digits_compute= dp.get_precision('Product Price')), } diff --git a/addons/stock/stock.py b/addons/stock/stock.py index 9be2ffbaf3e..205c3c0c465 100644 --- a/addons/stock/stock.py +++ b/addons/stock/stock.py @@ -2135,6 +2135,10 @@ class stock_move(osv.osv): propagated_changes_dict['product_uom_qty'] = vals['product_uom_qty'] if vals.get('product_uom_id'): propagated_changes_dict['product_uom_id'] = vals['product_uom_id'] + if vals.get('product_uos_qty'): + propagated_changes_dict['product_uos_qty'] = vals['product_uos_qty'] + if vals.get('product_uos_id'): + propagated_changes_dict['product_uos_id'] = vals['product_uos_id'] #propagation of expected date: propagated_date_field = False if vals.get('date_expected'): @@ -3169,8 +3173,6 @@ class stock_inventory_line(osv.osv): } def create(self, cr, uid, values, context=None): - if context is None: - context = {} product_obj = self.pool.get('product.product') dom = [('product_id', '=', values.get('product_id')), ('inventory_id.state', '=', 'confirm'), ('location_id', '=', values.get('location_id')), ('partner_id', '=', values.get('partner_id')), diff --git a/addons/web/static/src/xml/base.xml b/addons/web/static/src/xml/base.xml index 6d0ab1851ec..610fb2f1196 100644 --- a/addons/web/static/src/xml/base.xml +++ b/addons/web/static/src/xml/base.xml @@ -1439,13 +1439,11 @@ <t t-name="FieldMany2ManyCheckBoxes"> <t t-foreach="widget.get('records')" t-as="record"> <div> - <t t-if="widget.get('value').indexOf(record[0]) !== -1"> - <input type="checkbox" t-att-data-record-id="JSON.stringify(record[0])" checked="true"/> - </t> - <t t-if="widget.get('value').indexOf(record[0]) === -1"> - <input type="checkbox" t-att-data-record-id="JSON.stringify(record[0])"/> - </t> - <t t-esc="record[1]"/> + <label style="font-weight: normal"> + <input type="checkbox" t-att-data-record-id="JSON.stringify(record[0])" + t-att-checked="(widget.get('value').indexOf(record[0]) !== -1) or null"/> + <t t-esc="record[1]"/> + </label> </div> </t> </t> |
