[MERGE] forward port branch 11.0 up to dff2e242a5

This commit is contained in:
Christophe Simonis
2019-08-08 15:00:43 +02:00
5 changed files with 35 additions and 4 deletions
+4 -1
View File
@@ -494,7 +494,10 @@ class account_payment(models.Model):
move.line_ids.remove_move_reconcile()
move.button_cancel()
move.unlink()
rec.state = 'cancelled'
rec.write({
'state': 'cancelled',
'move_name': False,
})
@api.multi
def unlink(self):
+4 -1
View File
@@ -9,7 +9,7 @@ import zipfile
from odoo import api, models
_logger = logging.getLogger(__name__)
FTYPES = ['docx', 'pptx', 'xlsx', 'opendoc', 'pdf']
FTYPES = ['docx', 'pptx', 'xlsx', 'opendoc']
def textToString(element):
buff = u""
@@ -92,6 +92,9 @@ class IrAttachment(models.Model):
def _index_pdf(self, bin_data):
'''Index PDF documents'''
# extractText gives very bad results for indexing, hence we don't index PDF anymore. A
# better alternative is probably PDFMiner.six, but not for stable.
# See POC at https://github.com/odoo/odoo/pull/27568.
buf = u""
if bin_data.startswith(b'%PDF-'):
f = io.BytesIO(bin_data)
+1 -1
View File
@@ -10,7 +10,7 @@
<field name="end_date"/>
</group>
<group>
<field name="pos_config_ids" colspan="4" nolabel="1" />
<field name="pos_config_ids" mode="tree" colspan="4" nolabel="1" />
</group>
<footer>
<button name="generate_report" string="Print" type="object" class="btn-primary"/>
+1 -1
View File
@@ -22,7 +22,7 @@ internal transfer document is needed.
""",
'website': 'https://www.odoo.com/page/warehouse',
'depends': ['purchase', 'sale_stock'],
'data': ['data/stock_data.xml'],
'data': ['data/stock_data.xml', 'views/sale_order_views.xml'],
'installable': True,
'auto_install': False,
}
@@ -0,0 +1,25 @@
<?xml version="1.0"?>
<odoo>
<data>
<!-- Do not forward-port in 12.0 and upper -->
<record id="view_order_form_inherit_sale_stock" model="ir.ui.view">
<field name="name">sale.order.form.sale.dropshipping</field>
<field name="model">sale.order</field>
<field name="inherit_id" ref="sale.view_order_form"/>
<field name="arch" type="xml">
<xpath expr="//page/field[@name='order_line']/form//field[@name='product_updatable']" position="after">
<field name="purchase_line_ids" invisible="1"/>
</xpath>
<xpath expr="//page/field[@name='order_line']/form//field[@name='product_id']" position="attributes">
<attribute name="attrs">{'readonly': ['|', ('product_updatable', '=', False), ('purchase_line_ids', '!=', [])]}</attribute>
</xpath>
<xpath expr="//page/field[@name='order_line']/tree/field[@name='product_updatable']" position="after">
<field name="purchase_line_ids" invisible="1"/>
</xpath>
<xpath expr="//page/field[@name='order_line']/tree/field[@name='product_id']" position="attributes">
<attribute name="attrs">{'readonly': ['|', ('product_updatable', '=', False), ('purchase_line_ids', '!=', [])]}</attribute>
</xpath>
</field>
</record>
</data>
</odoo>