[IMP] stock_valuation_xlsx: FR translation
This commit is contained in:
@@ -36,14 +36,14 @@ class StockValuationXlsx(models.TransientModel):
|
||||
"be taken in the valuation.")
|
||||
categ_ids = fields.Many2many(
|
||||
'product.category', string='Product Category Filter',
|
||||
help="Leave this field empty to have a stock valuation for all your products.",
|
||||
help="Leave this field empty to have a stock valuation for all products.",
|
||||
)
|
||||
stock_date_type = fields.Selection([
|
||||
('present', 'Present'),
|
||||
('past', 'Past'),
|
||||
], string='Present or Past', default='present', required=True)
|
||||
], string='Temporality', default='present', required=True)
|
||||
past_date = fields.Datetime(
|
||||
string='Past Date', default=fields.Datetime.now)
|
||||
string='Valuation Date', default=fields.Datetime.now)
|
||||
categ_subtotal = fields.Boolean(
|
||||
string='Subtotals per Categories', default=True,
|
||||
help="Show a subtotal per product category.")
|
||||
@@ -79,19 +79,7 @@ class StockValuationXlsx(models.TransientModel):
|
||||
if (
|
||||
self.stock_date_type == 'past' and
|
||||
self.past_date > fields.Datetime.now()):
|
||||
raise UserError(_("The 'Past Date' must be in the past !"))
|
||||
cost_method_real_count = self.env['ir.property'].sudo().search([
|
||||
('company_id', '=', self.company_id.id),
|
||||
('name', '=', 'property_cost_method'),
|
||||
('value_text', '=', 'real'),
|
||||
('type', '=', 'selection'),
|
||||
], count=True)
|
||||
if cost_method_real_count:
|
||||
raise UserError(_(
|
||||
"There are %d properties that have "
|
||||
"'Costing Method' = 'Real Price'. This costing "
|
||||
"method is not supported by this module.")
|
||||
% cost_method_real_count)
|
||||
raise UserError(_("The 'Valuation Date' must be in the past!"))
|
||||
|
||||
def _prepare_product_domain(self):
|
||||
self.ensure_one()
|
||||
@@ -353,7 +341,7 @@ class StockValuationXlsx(models.TransientModel):
|
||||
depreciation_rules = self._prepare_expiry_depreciation_rules(company_id, past_date)
|
||||
if not depreciation_rules:
|
||||
raise UserError(_(
|
||||
"The are not stock depreciation rule for company '%s'.")
|
||||
"There are no stock depreciation rules for company '%s'.")
|
||||
% company.display_name)
|
||||
in_stock_product_ids = list(in_stock_products.keys())
|
||||
product_id2data = self.compute_product_data(
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
<field name="categ_ids" widget="many2many_tags"/>
|
||||
<field name="warehouse_id"/>
|
||||
<field name="location_id"/>
|
||||
<field name="stock_date_type" />
|
||||
<field name="stock_date_type" widget="radio"/>
|
||||
<field name="past_date" attrs="{'invisible': [('stock_date_type', '!=', 'past')], 'required': [('stock_date_type', '=', 'past')]}"/>
|
||||
<field name="standard_price_date" attrs="{'invisible': [('stock_date_type', '=', 'present')]}" widget="radio"/>
|
||||
<field name="categ_subtotal" />
|
||||
|
||||
@@ -34,7 +34,7 @@ class StockVariationXlsx(models.TransientModel):
|
||||
"be taken in the valuation.")
|
||||
categ_ids = fields.Many2many(
|
||||
'product.category', string='Product Category Filter',
|
||||
help="Leave this fields empty to have a stock valuation for all your products.")
|
||||
help="Leave this field empty to have a stock valuation for all products.")
|
||||
start_date = fields.Datetime(
|
||||
string='Start Date', required=True)
|
||||
standard_price_start_date_type = fields.Selection([
|
||||
@@ -45,7 +45,7 @@ class StockVariationXlsx(models.TransientModel):
|
||||
end_date_type = fields.Selection([
|
||||
('present', 'Present'),
|
||||
('past', 'Past'),
|
||||
], string='End Date Type', default='present', required=True)
|
||||
], string='End Date Temporality', default='present', required=True)
|
||||
end_date = fields.Datetime(
|
||||
string='End Date', default=fields.Datetime.now)
|
||||
standard_price_end_date_type = fields.Selection([
|
||||
@@ -78,18 +78,6 @@ class StockVariationXlsx(models.TransientModel):
|
||||
else:
|
||||
if self.start_date >= present:
|
||||
raise UserError(_("The start date must be in the past."))
|
||||
cost_method_real_count = self.env['ir.property'].sudo().search([
|
||||
('company_id', '=', self.company_id.id),
|
||||
('name', '=', 'property_cost_method'),
|
||||
('value_text', '=', 'real'),
|
||||
('type', '=', 'selection'),
|
||||
], count=True)
|
||||
if cost_method_real_count:
|
||||
raise UserError(_(
|
||||
"There are %d properties that have "
|
||||
"'Costing Method' = 'Real Price'. This costing "
|
||||
"method is not supported by this module.")
|
||||
% cost_method_real_count)
|
||||
|
||||
def _prepare_product_domain(self):
|
||||
self.ensure_one()
|
||||
|
||||
Reference in New Issue
Block a user