[MERGE] forward port branch 11.0 up to d129b0220e
This commit is contained in:
@@ -4,5 +4,8 @@
|
||||
<record id="base.nl" model="res.country">
|
||||
<field eval="'%(street_name)s %(street_number)s/%(street_number2)s'" name="street_format" />
|
||||
</record>
|
||||
<record id="base.mx" model="res.country">
|
||||
<field eval="'%(street_name)s %(street_number)s/%(street_number2)s'" name="street_format" />
|
||||
</record>
|
||||
</data>
|
||||
</odoo>
|
||||
|
||||
@@ -12,6 +12,7 @@ class TestStreetFields(TransactionCase):
|
||||
self.env.ref('base.be').write({'street_format': '%(street_name)s, %(street_number)s/%(street_number2)s'})
|
||||
self.env.ref('base.us').write({'street_format': '%(street_number)s/%(street_number2)s %(street_name)s'})
|
||||
self.env.ref('base.ch').write({'street_format': 'header %(street_name)s, %(street_number)s - %(street_number2)s trailer'})
|
||||
self.env.ref('base.mx').write({'street_format': '%(street_name)s %(street_number)s/%(street_number2)s'})
|
||||
|
||||
def create_and_assert(self, partner_name, country_id, street, street_name, street_number, street_number2):
|
||||
partner = self.Partner.create({'name': partner_name + '-1', 'street': street, 'country_id': country_id})
|
||||
@@ -39,6 +40,7 @@ class TestStreetFields(TransactionCase):
|
||||
self.create_and_assert('Test00', self.env.ref('base.us').id, '40/2b Chaussee de Namur', 'Chaussee de Namur', '40', '2b')
|
||||
self.create_and_assert('Test01', self.env.ref('base.us').id, '40 Chaussee de Namur', 'Chaussee de Namur', '40', '')
|
||||
self.create_and_assert('Test02', self.env.ref('base.us').id, 'Chaussee de Namur', 'de Namur', 'Chaussee', '')
|
||||
self.create_and_assert('Test03', self.env.ref('base.mx').id, 'Av. Miguel Hidalgo y Costilla 601', 'Av.', 'Miguel Hidalgo y Costilla 601', '')
|
||||
|
||||
def test_01_header_trailer(self):
|
||||
self.create_and_assert('Test10', self.env.ref('base.ch').id, 'header Chaussee de Namur, 40 - 2b trailer', 'Chaussee de Namur', '40', '2b')
|
||||
|
||||
@@ -19,13 +19,15 @@
|
||||
<field name="inherit_id" ref="base.view_partner_form"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//field[@name='street']" position="replace">
|
||||
<field name="street" invisible="1"/>
|
||||
<field name="street_name" placeholder="Street Name..." attrs="{'readonly': [('type', '=', 'contact'),('parent_id', '!=', False)]}"/>
|
||||
<div class="o_row">
|
||||
<label for="street_number" class="oe_edit_only"/>
|
||||
<div>
|
||||
<field name="street" class="oe_read_only"/>
|
||||
</div>
|
||||
<field name="street_name" placeholder="Street Name..." attrs="{'readonly': [('type', '=', 'contact'),('parent_id', '!=', False)]}" class="oe_edit_only"/>
|
||||
<div class="oe_edit_only o_row">
|
||||
<label for="street_number"/>
|
||||
<span> </span>
|
||||
<field name="street_number" attrs="{'readonly': [('type', '=', 'contact'),('parent_id', '!=', False)]}"/>
|
||||
<label for="street_number2" class="oe_edit_only"/>
|
||||
<label for="street_number2"/>
|
||||
<field name="street_number2" attrs="{'readonly': [('type', '=', 'contact'),('parent_id', '!=', False)]}"/>
|
||||
</div>
|
||||
</xpath>
|
||||
|
||||
@@ -155,8 +155,8 @@ class XmlDeclaration(models.TransientModel):
|
||||
OR (res_country.code is NULL AND countrypartner.code IS NOT NULL
|
||||
AND not countrypartner.code=%s))
|
||||
AND inv.type IN (%s, %s)
|
||||
AND to_char(inv.date_invoice, 'YYYY')=%s
|
||||
AND to_char(inv.date_invoice, 'MM')=%s
|
||||
AND to_char(COALESCE(inv.date, inv.date_invoice), 'YYYY')=%s
|
||||
AND to_char(COALESCE(inv.date, inv.date_invoice), 'MM')=%s
|
||||
"""
|
||||
|
||||
self.env.cr.execute(query, (company.id, company.partner_id.country_id.code,
|
||||
|
||||
@@ -30,8 +30,8 @@ class ReportIntrastat(models.Model):
|
||||
self.env.cr.execute("""
|
||||
create or replace view report_intrastat as (
|
||||
select
|
||||
to_char(inv.date_invoice, 'YYYY') as name,
|
||||
to_char(inv.date_invoice, 'MM') as month,
|
||||
to_char(coalesce(inv.date, inv.date_invoice), 'YYYY') as name,
|
||||
to_char(coalesce(inv.date, inv.date_invoice), 'MM') as month,
|
||||
min(inv_line.id) as id,
|
||||
intrastat.id as intrastat_id,
|
||||
upper(inv_country.code) as code,
|
||||
@@ -71,5 +71,5 @@ class ReportIntrastat(models.Model):
|
||||
inv.state in ('open','paid')
|
||||
and inv_line.product_id is not null
|
||||
and inv_country.intrastat=true
|
||||
group by to_char(inv.date_invoice, 'YYYY'), to_char(inv.date_invoice, 'MM'),intrastat.id,inv.type,pt.intrastat_id, inv_country.code,inv.number, inv.currency_id, inv.company_id
|
||||
group by to_char(coalesce(inv.date, inv.date_invoice), 'YYYY'), to_char(coalesce(inv.date, inv.date_invoice), 'MM'),intrastat.id,inv.type,pt.intrastat_id, inv_country.code,inv.number, inv.currency_id, inv.company_id
|
||||
)""")
|
||||
|
||||
@@ -56,10 +56,10 @@ class SaleReport(models.Model):
|
||||
sum(l.qty_delivered / u.factor * u2.factor) as qty_delivered,
|
||||
sum(l.qty_invoiced / u.factor * u2.factor) as qty_invoiced,
|
||||
sum(l.qty_to_invoice / u.factor * u2.factor) as qty_to_invoice,
|
||||
sum(l.price_total / COALESCE(cr.rate, 1.0)) as price_total,
|
||||
sum(l.price_subtotal / COALESCE(cr.rate, 1.0)) as price_subtotal,
|
||||
sum(l.price_reduce * l.qty_to_invoice / COALESCE(cr.rate, 1.0)) as amount_to_invoice,
|
||||
sum(l.price_reduce * l.qty_invoiced / COALESCE(cr.rate, 1.0)) as amount_invoiced,
|
||||
sum(l.price_total / COALESCE(NULLIF(cr.rate, 0), 1.0)) as price_total,
|
||||
sum(l.price_subtotal / COALESCE(NULLIF(cr.rate, 0), 1.0)) as price_subtotal,
|
||||
sum(l.price_reduce * l.qty_to_invoice / COALESCE(NULLIF(cr.rate, 0), 1.0)) as amount_to_invoice,
|
||||
sum(l.price_reduce * l.qty_invoiced / COALESCE(NULLIF(cr.rate, 0), 1.0)) as amount_invoiced,
|
||||
count(*) as nbr,
|
||||
s.name as name,
|
||||
s.date_order as date,
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
},
|
||||
commentEdition : function(){
|
||||
var positionComment = ($('#comments').position()).top-50;
|
||||
$(".o_website_chatter_form textarea").val('"' + selected_text + '" ').focus();
|
||||
$(".o_portal_chatter_composer_form textarea").val('"' + selected_text + '" ').focus();
|
||||
$('html, body').stop().animate({
|
||||
'scrollTop': positionComment
|
||||
}, 500, 'swing', function () {
|
||||
|
||||
@@ -330,7 +330,7 @@ class WebsiteSale(http.Controller):
|
||||
}
|
||||
return request.render("website_sale.product", values)
|
||||
|
||||
@http.route(['/shop/change_pricelist/<model("product.pricelist"):pl_id>'], type='http', auth="public", website=True)
|
||||
@http.route(['/shop/change_pricelist/<model("product.pricelist"):pl_id>'], type='http', auth="public", website=True, sitemap=False)
|
||||
def pricelist_change(self, pl_id, **post):
|
||||
if (pl_id.selectable or pl_id == request.env.user.partner_id.property_product_pricelist) \
|
||||
and request.website.is_pricelist_available(pl_id.id):
|
||||
@@ -338,7 +338,7 @@ class WebsiteSale(http.Controller):
|
||||
request.website.sale_get_order(force_pricelist=pl_id.id)
|
||||
return request.redirect(request.httprequest.referrer or '/shop')
|
||||
|
||||
@http.route(['/shop/pricelist'], type='http', auth="public", website=True)
|
||||
@http.route(['/shop/pricelist'], type='http', auth="public", website=True, sitemap=False)
|
||||
def pricelist(self, promo, **post):
|
||||
redirect = post.get('r', '/shop/cart')
|
||||
pricelist = request.env['product.pricelist'].sudo().search([('code', '=', promo)], limit=1)
|
||||
|
||||
@@ -164,7 +164,7 @@
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
overflow: hidden;
|
||||
padding: 0 15px 24px 10px;
|
||||
padding: 0 15px 0 10px;
|
||||
min-height: 56px;
|
||||
border-top: 1px solid rgba(255,255,255,0.2);
|
||||
background: rgba(255, 255, 255, 0.75);
|
||||
@@ -172,8 +172,6 @@
|
||||
}
|
||||
|
||||
.product_price {
|
||||
padding: 5px 0;
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -1099,7 +1099,7 @@
|
||||
</t>
|
||||
<input type='submit'/>
|
||||
</form>
|
||||
<a t-if="not actual_partner or (ship.id in actual_partner.ids + actual_partner.child_ids.ids)" class='btn btn-link pull-right js_edit_address no-decoration' title="Edit this address"><i class='fa fa-edit'/></a>
|
||||
<a t-if="not actual_partner or (ship.id in actual_partner.child_ids.ids)" class='btn btn-link pull-right js_edit_address no-decoration' title="Edit this address"><i class='fa fa-edit'/></a>
|
||||
<div t-att-class="'panel panel-default %s' % (selected and 'border_primary' or 'js_change_shipping')">
|
||||
<div class='panel-body' style='min-height: 130px;'>
|
||||
<t t-esc="contact" t-options="dict(widget='contact', fields=['name', 'address'], no_marker=True)"/>
|
||||
|
||||
@@ -20,3 +20,4 @@ Jairo Llopis jairo.llopis@tecnativa.com https://github.com/yajo
|
||||
Vicent Cubells vicent.cubells@tecnativa.com https://github.com/cubells
|
||||
Luis Montalba luis.montalba@tecnativa.com https://github.com/luismontalba
|
||||
David Vidal david.vidal@tecnativa.com https://github.com/chienandalu
|
||||
Cristina Martín cristina.martin@tecnativa.com https://github.com/cristinamartinrod
|
||||
|
||||
Reference in New Issue
Block a user