Skip to content

Commit c5ed372

Browse files
committed
[MERGE] forward port branch saas-15 up to 152d420
2 parents 1fe119d + 152d420 commit c5ed372

File tree

6 files changed

+10
-33
lines changed

6 files changed

+10
-33
lines changed

addons/calendar/models/calendar.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -902,8 +902,8 @@ def _inverse_dates(self):
902902
startdate = startdate.astimezone(pytz.utc) # Convert to UTC
903903
meeting.start = fields.Datetime.to_string(startdate)
904904
else:
905-
meeting.start = meeting.start_datetime
906-
meeting.stop = meeting.stop_datetime
905+
meeting.write({'start': meeting.start_datetime,
906+
'stop': meeting.stop_datetime})
907907

908908
@api.depends('byday', 'recurrency', 'final_date', 'rrule_type', 'month_by', 'interval', 'count', 'end_type', 'mo', 'tu', 'we', 'th', 'fr', 'sa', 'su', 'day', 'week_list')
909909
def _compute_rrule(self):

addons/l10n_ch/data/account_vat2011_data.xml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -415,7 +415,6 @@
415415
<field name="name">TVA due a 8.0% (TN)</field>
416416
<field name="description">8.0%</field>
417417
<field name="amount" eval="8.0"/>
418-
<field name="sequence" eval="0"/>
419418
<field name="amount_type">percent</field>
420419
<field name="chart_template_id" ref="l10nch_chart_template"/>
421420
<field name="type_tax_use">sale</field>
@@ -429,7 +428,6 @@
429428
<field name="description">8.0% Incl.</field>
430429
<field name="price_include" eval="1"/>
431430
<field name="amount" eval="8.0"/>
432-
<field name="sequence" eval="0"/>
433431
<field name="amount_type">percent</field>
434432
<field name="chart_template_id" ref="l10nch_chart_template"/>
435433
<field name="type_tax_use">sale</field>
@@ -443,7 +441,6 @@
443441
<field name="description">8.0% achat</field>
444442
<field name="amount" eval="8.0"/>
445443
<field name="amount_type">percent</field>
446-
<field name="sequence" eval="0"/>
447444
<field name="chart_template_id" ref="l10nch_chart_template"/>
448445
<field name="type_tax_use">purchase</field>
449446
<field name="refund_account_id" ref="ch_coa_1170"/>
@@ -457,7 +454,6 @@
457454
<field name="price_include" eval="1"/>
458455
<field name="amount" eval="8.0"/>
459456
<field name="amount_type">percent</field>
460-
<field name="sequence" eval="0"/>
461457
<field name="chart_template_id" ref="l10nch_chart_template"/>
462458
<field name="type_tax_use">purchase</field>
463459
<field name="refund_account_id" ref="ch_coa_1170"/>

addons/payment_stripe/tests/test_stripe.py

Lines changed: 4 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -62,31 +62,14 @@ def test_20_stripe_form_render(self):
6262
# ----------------------------------------
6363
# Test: button direct rendering
6464
# ----------------------------------------
65-
form_values = {
66-
'amount': 320.0,
67-
'currency': 'EUR',
68-
'address_line1': 'Huge Street 2/543',
69-
'address_city': 'Sin City',
70-
'address_country': 'Belgium',
71-
'email': 'norbert.buyer@example.com',
72-
'address_zip': '1000',
73-
'name': 'Norbert Buyer',
74-
'phone': '0032 12 34 56 78'
75-
}
7665

7766
# render the button
78-
res = self.stripe.render('SO404', 320.0, self.currency_euro.id, values=self.buyer_values)
79-
post_url = "https://checkout.stripe.com/checkout.js"
80-
email = "norbert.buyer@example.com"
67+
res = self.stripe.render('SO404', 320.0, self.currency_euro.id, values=self.buyer_values).decode('utf-8')
68+
popup_script_src = 'script src="https://checkout.stripe.com/checkout.js"'
8169
# check form result
82-
if "https://checkout.stripe.com/checkout.js" in res[0]:
83-
self.assertEqual(post_url, 'https://checkout.stripe.com/checkout.js', 'Stripe: wrong form POST url')
70+
self.assertIn(popup_script_src, res, "Stripe: popup script not found in template render")
8471
# Generated and received
85-
if email in res[0]:
86-
self.assertEqual(
87-
email, form_values.get('email'),
88-
'Stripe: wrong value for input %s: received %s instead of %s' % (email, email, form_values.get('email'))
89-
)
72+
self.assertIn(self.buyer_values.get('partner_email'), res, 'Stripe: email input not found in rendered template')
9073

9174
@unittest.skip("Stripe test disabled: We do not want to overload Stripe with runbot's requests")
9275
def test_30_stripe_form_management(self):

addons/stock/models/stock_inventory.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -332,7 +332,7 @@ class InventoryLine(models.Model):
332332
# TDE FIXME: necessary ? -> replace by location_id
333333
prodlot_name = fields.Char(
334334
'Serial Number Name',
335-
related='prod_lot_id.name', store=True)
335+
related='prod_lot_id.name', store=True, readonly=True)
336336
company_id = fields.Many2one(
337337
'res.company', 'Company', related='inventory_id.company_id',
338338
index=True, readonly=True, store=True)

addons/web_editor/controllers/main.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -361,16 +361,17 @@ def save_less(self, url, bundle_xmlid, content):
361361

362362
# Check if the file to save had already been modified
363363
custom_attachment = IrAttachment.search([("url", "=", custom_url)])
364+
datas = base64.b64encode((content or "\n").encode("utf-8"))
364365
if custom_attachment:
365366
# If it was already modified, simply override the corresponding attachment content
366-
custom_attachment.write({"datas": base64.b64encode(content.encode("utf-8"))})
367+
custom_attachment.write({"datas": datas})
367368
else:
368369
# If not, create a new attachment to copy the original LESS file content, with its modifications
369370
IrAttachment.create(dict(
370371
name = custom_url,
371372
type = "binary",
372373
mimetype = "text/less",
373-
datas = base64.b64encode(content.encode("utf-8")),
374+
datas = datas,
374375
datas_fname = url.split("/")[-1],
375376
url = custom_url, # Having an attachment of "binary" type with an non empty "url" field
376377
# is quite of an hack. This allows to fetch the "datas" field by adding

debian/postrm

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,6 @@ case "${1}" in
1010
remove)
1111
deluser --quiet --system $ODOO_USER || true
1212
delgroup --quiet --system --only-if-empty $ODOO_GROUP || true
13-
if [ -d "$ODOO_LIB_DIR" ]; then
14-
rm -rf $ODOO_LIB_DIR
15-
fi
1613
;;
1714

1815
purge)

0 commit comments

Comments
 (0)