[MERGE] forward port branch saas-11 up to 65a67ce
This commit is contained in:
@@ -175,11 +175,11 @@ class Inventory(models.Model):
|
||||
|
||||
@api.multi
|
||||
def action_start(self):
|
||||
for inventory in self.filtered(lambda inventory: not inventory.line_ids and inventory.filter != 'partial'):
|
||||
self.write({
|
||||
'line_ids': [(0, 0, line_values) for line_values in inventory._get_inventory_lines_values()],
|
||||
'state': 'confirm', 'date': fields.Datetime.now()
|
||||
})
|
||||
for inventory in self.filtered(lambda x: not x.line_ids):
|
||||
vals = {'state': 'confirm', 'date': fields.Datetime.now()}
|
||||
if inventory.filter != 'partial':
|
||||
vals.update({'line_ids': [(0, 0, line_values) for line_values in inventory._get_inventory_lines_values()]})
|
||||
inventory.write(vals)
|
||||
return True
|
||||
prepare_inventory = action_start
|
||||
|
||||
|
||||
@@ -424,7 +424,8 @@ class Picking(models.Model):
|
||||
|
||||
@api.multi
|
||||
def unlink(self):
|
||||
self.mapped('move_lines').action_cancel().unlink()
|
||||
self.mapped('move_lines').action_cancel()
|
||||
self.mapped('move_lines').unlink() # Checks if moves are not done
|
||||
return super(Picking, self).unlink()
|
||||
|
||||
# Actions
|
||||
|
||||
@@ -8,6 +8,10 @@ html, body {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
.editor_enable .css_editable_mode_hidden {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
/* ----- Editor (for public user, like forum) ----- */
|
||||
.note-toolbar {
|
||||
margin-left: 0 !important;
|
||||
|
||||
@@ -501,6 +501,13 @@
|
||||
<span itemprop="price" style="display:none;" t-esc="product.price"/>
|
||||
<span itemprop="priceCurrency" style="display:none;" t-esc="website.currency_id.name"/>
|
||||
</h4>
|
||||
<h4 class="css_non_editable_mode_hidden">
|
||||
<span t-field="product.lst_price"
|
||||
t-field-options='{
|
||||
"widget": "monetary",
|
||||
"display_currency": "product.currency_id"
|
||||
}'/>
|
||||
</h4>
|
||||
<h4 class="hidden oe_not_available bg-warning">Product not available</h4>
|
||||
</div>
|
||||
</template>
|
||||
@@ -1549,4 +1556,4 @@
|
||||
</t>
|
||||
</xpath>
|
||||
</template>
|
||||
</odoo>
|
||||
</odoo>
|
||||
|
||||
Reference in New Issue
Block a user