mirror of
https://gitlab.com/flectra-hq/flectra.git
synced 2026-10-25 07:27:39 -05:00
Merge branch 'master-upstream-patch-19082023' into 'master'
[PATCH] Upstream patch - 19082023 See merge request flectra-hq/flectra!1112
This commit is contained in:
commit
f3b6b629ab
8 files changed
+117
-3
No files matched your search
@@ -174,6 +174,9 @@ var BoardRenderer = FormRenderer.extend({
|
||||
*/
|
||||
changeLayout: function (layout) {
|
||||
var $dashboard = this.$('.oe_dashboard');
|
||||
if (!$dashboard.length) {
|
||||
return;
|
||||
}
|
||||
var current_layout = $dashboard.attr('data-layout');
|
||||
if (current_layout !== layout) {
|
||||
var clayout = current_layout.split('-').length,
|
||||
|
||||
@@ -113,4 +113,35 @@ flectra.define("board.dashboard_tests", function (require) {
|
||||
|
||||
target.destroy();
|
||||
});
|
||||
|
||||
QUnit.test("empty board view", async function (assert) {
|
||||
assert.expect(2);
|
||||
const target = await createView({
|
||||
View: BoardView,
|
||||
debug: 1,
|
||||
model: "board",
|
||||
data: this.data,
|
||||
arch: `<form string="My Dashboard">
|
||||
<board style="2-1">
|
||||
<column/>
|
||||
</board>
|
||||
</form>`,
|
||||
archs: {
|
||||
"partner,4,list": '<tree string="Partner"><field name="foo"/></tree>',
|
||||
},
|
||||
});
|
||||
|
||||
assert.hasClass(
|
||||
target.renderer.$el,
|
||||
"o_dashboard",
|
||||
"with a dashboard, the renderer should have the proper css class"
|
||||
);
|
||||
assert.containsOnce(
|
||||
target,
|
||||
".o_dashboard .o_view_nocontent",
|
||||
"should have a no content helper"
|
||||
);
|
||||
|
||||
target.destroy();
|
||||
});
|
||||
});
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
{
|
||||
'name': 'Turkey - Accounting',
|
||||
'version': '1.0',
|
||||
'version': '1.1',
|
||||
'category': 'Accounting/Localizations/Account Charts',
|
||||
'description': """
|
||||
Türkiye için Tek düzen hesap planı şablonu Flectra Modülü.
|
||||
|
||||
@@ -7,5 +7,9 @@
|
||||
<field name="name">KDV %18</field>
|
||||
</record>
|
||||
|
||||
<record id="tax_group_kdv_20" model="account.tax.group">
|
||||
<field name="name">KDV 20%</field>
|
||||
</record>
|
||||
|
||||
</data>
|
||||
</flectra>
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<flectra>
|
||||
<!-- account.tax.template -->
|
||||
<!-- account.tax.template (pre-2023) -->
|
||||
<record id="tr_kdv_satis_sale_18" model="account.tax.template">
|
||||
<field name="sequence">11</field>
|
||||
<field name="description">KDV %18(sale)</field>
|
||||
@@ -68,4 +68,73 @@
|
||||
}),
|
||||
]"/>
|
||||
</record>
|
||||
|
||||
<!-- account.tax.template (introduced in July 2023) -->
|
||||
<record id="tr_kdv_satis_sale_20" model="account.tax.template">
|
||||
<field name="sequence">13</field>
|
||||
<field name="description">KDV 20%</field>
|
||||
<field name="name">20%</field>
|
||||
<field name="price_include" eval="0"/>
|
||||
<field name="amount">20</field>
|
||||
<field name="amount_type">percent</field>
|
||||
<field name="type_tax_use">sale</field>
|
||||
<field name="chart_template_id" ref="l10ntr_tek_duzen_hesap"/>
|
||||
<field name="tax_group_id" ref="tax_group_kdv_20"/>
|
||||
<field name="invoice_repartition_line_ids" eval="[(5,0,0),
|
||||
(0,0, {
|
||||
'factor_percent': 100,
|
||||
'repartition_type': 'base',
|
||||
}),
|
||||
(0,0, {
|
||||
'factor_percent': 100,
|
||||
'repartition_type': 'tax',
|
||||
'account_id': ref('tr391'),
|
||||
}),
|
||||
]"/>
|
||||
<field name="refund_repartition_line_ids" eval="[(5,0,0),
|
||||
(0,0, {
|
||||
'factor_percent': 100,
|
||||
'repartition_type': 'base',
|
||||
}),
|
||||
(0,0, {
|
||||
'factor_percent': 100,
|
||||
'repartition_type': 'tax',
|
||||
'account_id': ref('tr191'),
|
||||
}),
|
||||
]"/>
|
||||
</record>
|
||||
|
||||
<record id="tr_kdv_satis_purchase_20" model="account.tax.template">
|
||||
<field name="sequence">14</field>
|
||||
<field name="description">KDV 20%</field>
|
||||
<field name="name">20%</field>
|
||||
<field name="price_include" eval="0"/>
|
||||
<field name="amount">20</field>
|
||||
<field name="amount_type">percent</field>
|
||||
<field name="type_tax_use">purchase</field>
|
||||
<field name="chart_template_id" ref="l10ntr_tek_duzen_hesap"/>
|
||||
<field name="tax_group_id" ref="tax_group_kdv_20"/>
|
||||
<field name="invoice_repartition_line_ids" eval="[(5,0,0),
|
||||
(0,0, {
|
||||
'factor_percent': 100,
|
||||
'repartition_type': 'base',
|
||||
}),
|
||||
(0,0, {
|
||||
'factor_percent': 100,
|
||||
'repartition_type': 'tax',
|
||||
'account_id': ref('tr391'),
|
||||
}),
|
||||
]"/>
|
||||
<field name="refund_repartition_line_ids" eval="[(5,0,0),
|
||||
(0,0, {
|
||||
'factor_percent': 100,
|
||||
'repartition_type': 'base',
|
||||
}),
|
||||
(0,0, {
|
||||
'factor_percent': 100,
|
||||
'repartition_type': 'tax',
|
||||
'account_id': ref('tr191'),
|
||||
}),
|
||||
]"/>
|
||||
</record>
|
||||
</flectra>
|
||||
@@ -0,0 +1,6 @@
|
||||
# Part of Odoo, Flectra. See LICENSE file for full copyright and licensing details.
|
||||
from flectra.addons.account.models.chart_template import update_taxes_from_templates
|
||||
|
||||
|
||||
def migrate(cr, version):
|
||||
update_taxes_from_templates(cr, 'l10n_tr.l10ntr_tek_duzen_hesap')
|
||||
@@ -1614,7 +1614,7 @@ class StockMove(models.Model):
|
||||
:returns: list of dict. stock move values """
|
||||
self.ensure_one()
|
||||
if self.state in ('done', 'cancel'):
|
||||
raise UserError(_('You cannot split a stock move that has been set to \'Done\'.'))
|
||||
raise UserError(_('You cannot split a stock move that has been set to \'Done\' or \'Cancel\'.'))
|
||||
elif self.state == 'draft':
|
||||
# we restrict the split of a draft move because if not confirmed yet, it may be replaced by several other moves in
|
||||
# case of phantom bom (with mrp module). And we don't want to deal with this complexity by copying the product that will explode.
|
||||
|
||||
@@ -134,6 +134,7 @@
|
||||
t-ref="input"
|
||||
t-on-change="_onInputChange"
|
||||
t-on-click="_onInputClick"
|
||||
autocomplete="off"
|
||||
/>
|
||||
<span t-if="props.warn_future and state.warning" class="fa fa-exclamation-triangle o_tz_warning o_datepicker_warning">
|
||||
<t>This date is on the future. Make sure it is what you expected.</t>
|
||||
|
||||
Reference in new issue
Block a user