[MERGE] forward port branch saas-15 up to 152d42041e
This commit is contained in:
@@ -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):
|
||||
|
||||
@@ -415,7 +415,6 @@
|
||||
<field name="name">TVA due a 8.0% (TN)</field>
|
||||
<field name="description">8.0%</field>
|
||||
<field name="amount" eval="8.0"/>
|
||||
<field name="sequence" eval="0"/>
|
||||
<field name="amount_type">percent</field>
|
||||
<field name="chart_template_id" ref="l10nch_chart_template"/>
|
||||
<field name="type_tax_use">sale</field>
|
||||
@@ -429,7 +428,6 @@
|
||||
<field name="description">8.0% Incl.</field>
|
||||
<field name="price_include" eval="1"/>
|
||||
<field name="amount" eval="8.0"/>
|
||||
<field name="sequence" eval="0"/>
|
||||
<field name="amount_type">percent</field>
|
||||
<field name="chart_template_id" ref="l10nch_chart_template"/>
|
||||
<field name="type_tax_use">sale</field>
|
||||
@@ -443,7 +441,6 @@
|
||||
<field name="description">8.0% achat</field>
|
||||
<field name="amount" eval="8.0"/>
|
||||
<field name="amount_type">percent</field>
|
||||
<field name="sequence" eval="0"/>
|
||||
<field name="chart_template_id" ref="l10nch_chart_template"/>
|
||||
<field name="type_tax_use">purchase</field>
|
||||
<field name="refund_account_id" ref="ch_coa_1170"/>
|
||||
@@ -457,7 +454,6 @@
|
||||
<field name="price_include" eval="1"/>
|
||||
<field name="amount" eval="8.0"/>
|
||||
<field name="amount_type">percent</field>
|
||||
<field name="sequence" eval="0"/>
|
||||
<field name="chart_template_id" ref="l10nch_chart_template"/>
|
||||
<field name="type_tax_use">purchase</field>
|
||||
<field name="refund_account_id" ref="ch_coa_1170"/>
|
||||
|
||||
@@ -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):
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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
|
||||
|
||||
Vendored
-3
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user