diff --git a/addons/calendar/models/calendar.py b/addons/calendar/models/calendar.py index 99abf2a786a..e5a006088be 100644 --- a/addons/calendar/models/calendar.py +++ b/addons/calendar/models/calendar.py @@ -902,8 +902,8 @@ class Meeting(models.Model): startdate = startdate.astimezone(pytz.utc) # Convert to UTC meeting.start = fields.Datetime.to_string(startdate) else: - meeting.start = meeting.start_datetime - meeting.stop = meeting.stop_datetime + meeting.write({'start': meeting.start_datetime, + 'stop': meeting.stop_datetime}) @api.depends('byday', 'recurrency', 'final_date', 'rrule_type', 'month_by', 'interval', 'count', 'end_type', 'mo', 'tu', 'we', 'th', 'fr', 'sa', 'su', 'day', 'week_list') def _compute_rrule(self): diff --git a/addons/l10n_ch/data/account_vat2011_data.xml b/addons/l10n_ch/data/account_vat2011_data.xml index ef45ee02a01..0da193cd9ad 100644 --- a/addons/l10n_ch/data/account_vat2011_data.xml +++ b/addons/l10n_ch/data/account_vat2011_data.xml @@ -415,7 +415,6 @@ TVA due a 8.0% (TN) 8.0% - percent sale @@ -429,7 +428,6 @@ 8.0% Incl. - percent sale @@ -443,7 +441,6 @@ 8.0% achat percent - purchase @@ -457,7 +454,6 @@ percent - purchase diff --git a/addons/payment_stripe/tests/test_stripe.py b/addons/payment_stripe/tests/test_stripe.py index ded2b7e9465..5ca3988dc04 100644 --- a/addons/payment_stripe/tests/test_stripe.py +++ b/addons/payment_stripe/tests/test_stripe.py @@ -62,31 +62,14 @@ class StripeTest(StripeCommon): # ---------------------------------------- # Test: button direct rendering # ---------------------------------------- - form_values = { - 'amount': 320.0, - 'currency': 'EUR', - 'address_line1': 'Huge Street 2/543', - 'address_city': 'Sin City', - 'address_country': 'Belgium', - 'email': 'norbert.buyer@example.com', - 'address_zip': '1000', - 'name': 'Norbert Buyer', - 'phone': '0032 12 34 56 78' - } # render the button - res = self.stripe.render('SO404', 320.0, self.currency_euro.id, values=self.buyer_values) - post_url = "https://checkout.stripe.com/checkout.js" - email = "norbert.buyer@example.com" + res = self.stripe.render('SO404', 320.0, self.currency_euro.id, values=self.buyer_values).decode('utf-8') + popup_script_src = 'script src="https://checkout.stripe.com/checkout.js"' # check form result - if "https://checkout.stripe.com/checkout.js" in res[0]: - self.assertEqual(post_url, 'https://checkout.stripe.com/checkout.js', 'Stripe: wrong form POST url') + self.assertIn(popup_script_src, res, "Stripe: popup script not found in template render") # Generated and received - if email in res[0]: - self.assertEqual( - email, form_values.get('email'), - 'Stripe: wrong value for input %s: received %s instead of %s' % (email, email, form_values.get('email')) - ) + self.assertIn(self.buyer_values.get('partner_email'), res, 'Stripe: email input not found in rendered template') @unittest.skip("Stripe test disabled: We do not want to overload Stripe with runbot's requests") def test_30_stripe_form_management(self): diff --git a/addons/stock/models/stock_inventory.py b/addons/stock/models/stock_inventory.py index 1f10a4940f6..fee89f0fa80 100644 --- a/addons/stock/models/stock_inventory.py +++ b/addons/stock/models/stock_inventory.py @@ -332,7 +332,7 @@ class InventoryLine(models.Model): # TDE FIXME: necessary ? -> replace by location_id prodlot_name = fields.Char( 'Serial Number Name', - related='prod_lot_id.name', store=True) + related='prod_lot_id.name', store=True, readonly=True) company_id = fields.Many2one( 'res.company', 'Company', related='inventory_id.company_id', index=True, readonly=True, store=True) diff --git a/addons/web_editor/controllers/main.py b/addons/web_editor/controllers/main.py index 91b698bf03a..c3f11def23b 100644 --- a/addons/web_editor/controllers/main.py +++ b/addons/web_editor/controllers/main.py @@ -361,16 +361,17 @@ class Web_Editor(http.Controller): # Check if the file to save had already been modified custom_attachment = IrAttachment.search([("url", "=", custom_url)]) + datas = base64.b64encode((content or "\n").encode("utf-8")) if custom_attachment: # If it was already modified, simply override the corresponding attachment content - custom_attachment.write({"datas": base64.b64encode(content.encode("utf-8"))}) + custom_attachment.write({"datas": datas}) else: # If not, create a new attachment to copy the original LESS file content, with its modifications IrAttachment.create(dict( name = custom_url, type = "binary", mimetype = "text/less", - datas = base64.b64encode(content.encode("utf-8")), + datas = datas, datas_fname = url.split("/")[-1], url = custom_url, # Having an attachment of "binary" type with an non empty "url" field # is quite of an hack. This allows to fetch the "datas" field by adding diff --git a/debian/postrm b/debian/postrm index 22f7211203f..274a488c1bf 100644 --- a/debian/postrm +++ b/debian/postrm @@ -10,9 +10,6 @@ case "${1}" in remove) deluser --quiet --system $ODOO_USER || true delgroup --quiet --system --only-if-empty $ODOO_GROUP || true - if [ -d "$ODOO_LIB_DIR" ]; then - rm -rf $ODOO_LIB_DIR - fi ;; purge)