Skip to content
Permalink
Browse files

[MERGE] forward port branch 11.0 up to dff2e24

  • Loading branch information...
KangOl committed Aug 8, 2019
2 parents 97d81f1 + dff2e24 commit 7321c8e2600c8f1bb53bc4ad593933b5f57c00f9
@@ -494,7 +494,10 @@ def cancel(self):
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):
@@ -9,7 +9,7 @@
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 @@ def _index_opendoc(self, bin_data):
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)
@@ -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"/>
@@ -22,7 +22,7 @@
""",
'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>

0 comments on commit 7321c8e

Please sign in to comment.
You can’t perform that action at this time.