mirror of
https://gitlab.com/flectra-hq/flectra.git
synced 2026-08-19 01:34:43 -05:00
[PATCH] Upstream patch - 02032022
This commit is contained in:
@@ -209,7 +209,7 @@
|
||||
<ram:SpecifiedTradePaymentTerms>
|
||||
<ram:Description t-if="record.invoice_payment_term_id" t-esc="record.invoice_payment_term_id.name"/>
|
||||
<ram:DueDateDateTime t-if="record.invoice_date_due">
|
||||
<udt:DateTimeString t-esc="format_date(record.invoice_date_due)"/>
|
||||
<udt:DateTimeString format="102" t-esc="format_date(record.invoice_date_due)"/>
|
||||
</ram:DueDateDateTime>
|
||||
</ram:SpecifiedTradePaymentTerms>
|
||||
|
||||
|
||||
@@ -134,7 +134,7 @@ class TestAccountEdiFacturx(AccountEdiTestCommon):
|
||||
</ApplicableTradeTax>
|
||||
<SpecifiedTradePaymentTerms>
|
||||
<DueDateDateTime>
|
||||
<DateTimeString>20170101</DateTimeString>
|
||||
<DateTimeString format="102">20170101</DateTimeString>
|
||||
</DueDateDateTime>
|
||||
</SpecifiedTradePaymentTerms>
|
||||
<SpecifiedTradeSettlementHeaderMonetarySummation>
|
||||
@@ -196,7 +196,7 @@ class TestAccountEdiFacturx(AccountEdiTestCommon):
|
||||
</ApplicableTradeTax>
|
||||
<SpecifiedTradePaymentTerms>
|
||||
<DueDateDateTime>
|
||||
<DateTimeString>20170101</DateTimeString>
|
||||
<DateTimeString format="102">20170101</DateTimeString>
|
||||
</DueDateDateTime>
|
||||
</SpecifiedTradePaymentTerms>
|
||||
<SpecifiedTradeSettlementHeaderMonetarySummation>
|
||||
|
||||
@@ -1152,6 +1152,9 @@ class HolidaysRequest(models.Model):
|
||||
if not is_officer and self.env.user != holiday.employee_id.leave_manager_id:
|
||||
raise UserError(_('You must be either %s\'s manager or Time off Manager to approve this leave') % (holiday.employee_id.name))
|
||||
|
||||
if not is_officer and (state == 'validate' and val_type == 'hr') and holiday.holiday_type == 'employee':
|
||||
raise UserError(_('You must either be a Time off Officer or Time off Manager to approve this leave'))
|
||||
|
||||
# ------------------------------------------------------------
|
||||
# Activity methods
|
||||
# ------------------------------------------------------------
|
||||
|
||||
@@ -2,6 +2,7 @@ flectra.define('hr_holidays.dashboard.view_custo', function(require) {
|
||||
'use strict';
|
||||
|
||||
var core = require('web.core');
|
||||
var CalendarModel = require('web.CalendarModel');
|
||||
var CalendarPopover = require('web.CalendarPopover');
|
||||
var CalendarController = require("web.CalendarController");
|
||||
var CalendarRenderer = require("web.CalendarRenderer");
|
||||
@@ -11,6 +12,15 @@ flectra.define('hr_holidays.dashboard.view_custo', function(require) {
|
||||
var _t = core._t;
|
||||
var QWeb = core.qweb;
|
||||
|
||||
var TimeOffCalendarModel = CalendarModel.extend({
|
||||
|
||||
_getFilterDomain: function() {
|
||||
const company_domain = [['user_id.company_id', 'in', this.data.context.allowed_company_ids]];
|
||||
return this._super().concat(company_domain);
|
||||
},
|
||||
|
||||
});
|
||||
|
||||
var TimeOffCalendarPopover = CalendarPopover.extend({
|
||||
template: 'hr_holidays.calendar.popover',
|
||||
|
||||
@@ -165,6 +175,7 @@ flectra.define('hr_holidays.dashboard.view_custo', function(require) {
|
||||
config: _.extend({}, CalendarView.prototype.config, {
|
||||
Controller: TimeOffCalendarController,
|
||||
Renderer: TimeOffCalendarRenderer,
|
||||
Model: TimeOffCalendarModel,
|
||||
}),
|
||||
});
|
||||
|
||||
|
||||
@@ -203,7 +203,7 @@ class StockLandedCost(models.Model):
|
||||
for product in cost.cost_lines.product_id:
|
||||
accounts = product.product_tmpl_id.get_product_accounts()
|
||||
input_account = accounts['stock_input']
|
||||
all_amls.filtered(lambda aml: aml.account_id == input_account and not aml.full_reconcile_id).reconcile()
|
||||
all_amls.filtered(lambda aml: aml.account_id == input_account and not aml.reconciled).reconcile()
|
||||
|
||||
return True
|
||||
|
||||
|
||||
Reference in New Issue
Block a user