mirror of
https://gitlab.com/flectra-hq/flectra.git
synced 2025-02-25 18:55:21 -06:00
[PATCH] Upstream patch - 04042023
This commit is contained in:
@@ -3515,20 +3515,16 @@ class AccountMoveLine(models.Model):
|
||||
# Out invoice.
|
||||
if self.product_id.taxes_id:
|
||||
tax_ids = self.product_id.taxes_id.filtered(lambda tax: tax.company_id == self.move_id.company_id)
|
||||
elif self.account_id.tax_ids:
|
||||
tax_ids = self.account_id.tax_ids
|
||||
else:
|
||||
tax_ids = self.env['account.tax']
|
||||
tax_ids = self.account_id.tax_ids.filtered(lambda tax: tax.type_tax_use == 'sale')
|
||||
if not tax_ids and not self.exclude_from_invoice_tab:
|
||||
tax_ids = self.move_id.company_id.account_sale_tax_id
|
||||
elif self.move_id.is_purchase_document(include_receipts=True):
|
||||
# In invoice.
|
||||
if self.product_id.supplier_taxes_id:
|
||||
tax_ids = self.product_id.supplier_taxes_id.filtered(lambda tax: tax.company_id == self.move_id.company_id)
|
||||
elif self.account_id.tax_ids:
|
||||
tax_ids = self.account_id.tax_ids
|
||||
else:
|
||||
tax_ids = self.env['account.tax']
|
||||
tax_ids = self.account_id.tax_ids.filtered(lambda tax: tax.type_tax_use == 'purchase')
|
||||
if not tax_ids and not self.exclude_from_invoice_tab:
|
||||
tax_ids = self.move_id.company_id.account_purchase_tax_id
|
||||
else:
|
||||
|
||||
@@ -16,7 +16,7 @@ class Event(models.Model):
|
||||
'target': 'current',
|
||||
'context': {
|
||||
'default_mailing_model_id': self.env.ref('event.model_event_registration').id,
|
||||
'default_mailing_domain': repr([('event_id', 'in', self.ids)])
|
||||
'default_mailing_domain': repr([('event_id', 'in', self.ids), ('state', '!=', 'cancel')])
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
@@ -191,7 +191,9 @@ const FontFamilyPickerUserValueWidget = SelectUserValueWidget.extend({
|
||||
let isValidFamily = false;
|
||||
|
||||
try {
|
||||
const result = await fetch("https://fonts.googleapis.com/css?family=" + encodeURIComponent(m[1]) + ':300,300i,400,400i,700,700i', {method: 'HEAD'});
|
||||
// Font family is an encoded query parameter:
|
||||
// "Open+Sans" needs to remain "Open+Sans".
|
||||
const result = await fetch("https://fonts.googleapis.com/css?family=" + m[1] + ':300,300i,400,400i,700,700i', {method: 'HEAD'});
|
||||
// Google fonts server returns a 400 status code if family is not valid.
|
||||
if (result.ok) {
|
||||
isValidFamily = true;
|
||||
|
||||
@@ -99,7 +99,8 @@ $i: 1;
|
||||
font-family: o-safe-get($font-config, 'family', $font-family-base);
|
||||
|
||||
&::before {
|
||||
content: $font-name;
|
||||
// Must prevail against the '/' for missing values.
|
||||
content: $font-name !important;
|
||||
}
|
||||
}
|
||||
$i: $i + 1;
|
||||
|
||||
Reference in New Issue
Block a user