Skip to content

Commit

Permalink
Merge PR OCA#3964 into 16.0
Browse files Browse the repository at this point in the history
Signed-off-by tafaRU
  • Loading branch information
OCA-git-bot committed Nov 15, 2024
2 parents 167ebaa + 7eb5303 commit ba79f52
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 32 deletions.
4 changes: 2 additions & 2 deletions l10n_it_intrastat_statement/models/intrastat_statement.py
Original file line number Diff line number Diff line change
Expand Up @@ -764,8 +764,8 @@ def compute_statement(self):

# Search intrastat lines
domain = [
("invoice_date", ">=", period_date_start),
("invoice_date", "<=", period_date_stop),
("date", ">=", period_date_start),
("date", "<=", period_date_stop),
("intrastat", "=", True),
]
inv_type = []
Expand Down
60 changes: 30 additions & 30 deletions l10n_it_intrastat_statement/tests/test_intrastat_statement.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,8 +121,8 @@ def test_statement_sale(self):

statement = self.statement_model.create(
{
"period_number": invoice.invoice_date.month,
"fiscalyear": invoice.invoice_date.year,
"period_number": invoice.date.month,
"fiscalyear": invoice.date.year,
}
)

Expand All @@ -140,13 +140,13 @@ def test_statement_sale(self):

def test_statement_sale_quarter(self):
invoice = self._get_intrastat_computed_invoice()
month = invoice.invoice_date.month
month = invoice.date.month
quarter = 1 + (month - 1) // 3
statement = self.statement_model.create(
{
"period_number": quarter,
"period_type": "T",
"fiscalyear": invoice.invoice_date.year,
"fiscalyear": invoice.date.year,
}
)

Expand All @@ -162,8 +162,8 @@ def test_statement_purchase(self):

statement = self.statement_model.create(
{
"period_number": bill.invoice_date.month,
"fiscalyear": bill.invoice_date.year,
"period_number": bill.date.month,
"fiscalyear": bill.date.year,
}
)

Expand All @@ -184,8 +184,8 @@ def test_statement_purchase_currency(self):

statement = self.statement_model.create(
{
"period_number": bill.invoice_date.month,
"fiscalyear": bill.invoice_date.year,
"period_number": bill.date.month,
"fiscalyear": bill.date.year,
}
)

Expand All @@ -210,8 +210,8 @@ def test_statement_purchase_refund(self):

statement = self.statement_model.create(
{
"period_number": bill_refund.invoice_date.month,
"fiscalyear": bill_refund.invoice_date.year,
"period_number": bill_refund.date.month,
"fiscalyear": bill_refund.date.year,
}
)

Expand Down Expand Up @@ -249,8 +249,8 @@ def test_statement_purchase_refund_no_subtract(self):

statement = self.statement_model.create(
{
"period_number": bill_refund.invoice_date.month,
"fiscalyear": bill_refund.invoice_date.year,
"period_number": bill_refund.date.month,
"fiscalyear": bill_refund.date.year,
}
)

Expand Down Expand Up @@ -288,8 +288,8 @@ def test_statement_purchase_service_refund_no_subtract(self):

statement = self.statement_model.create(
{
"period_number": bill_refund.invoice_date.month,
"fiscalyear": bill_refund.invoice_date.year,
"period_number": bill_refund.date.month,
"fiscalyear": bill_refund.date.year,
}
)

Expand Down Expand Up @@ -326,13 +326,13 @@ def test_statement_purchase_service_refund_no_subtract(self):

def test_statement_purchase_quarter(self):
bill = self._get_intrastat_computed_bill()
month = bill.invoice_date.month
month = bill.date.month
quarter = 1 + (month - 1) // 3
statement = self.statement_model.create(
{
"period_number": quarter,
"period_type": "T",
"fiscalyear": bill.invoice_date.year,
"fiscalyear": bill.date.year,
}
)

Expand All @@ -348,8 +348,8 @@ def test_statement_export_file(self):

statement = self.statement_model.create(
{
"period_number": invoice.invoice_date.month,
"fiscalyear": invoice.invoice_date.year,
"period_number": invoice.date.month,
"fiscalyear": invoice.date.year,
}
)
statement.compute_statement()
Expand All @@ -369,8 +369,8 @@ def test_purchase_default_transaction_nature(self):

statement = self.statement_model.create(
{
"period_number": bill.invoice_date.month,
"fiscalyear": bill.invoice_date.year,
"period_number": bill.date.month,
"fiscalyear": bill.date.year,
}
)
line = statement.purchase_section1_ids.create({})
Expand All @@ -385,8 +385,8 @@ def test_sale_default_transaction_nature(self):

statement = self.statement_model.create(
{
"period_number": invoice.invoice_date.month,
"fiscalyear": invoice.invoice_date.year,
"period_number": invoice.date.month,
"fiscalyear": invoice.date.year,
}
)

Expand All @@ -404,8 +404,8 @@ def test_statement_sale_round_up_amounts(self):

statement = self.statement_model.create(
{
"period_number": invoice.invoice_date.month,
"fiscalyear": invoice.invoice_date.year,
"period_number": invoice.date.month,
"fiscalyear": invoice.date.year,
}
)
statement.compute_statement()
Expand All @@ -423,8 +423,8 @@ def test_statement_sale_round_down_amounts(self):

statement = self.statement_model.create(
{
"period_number": invoice.invoice_date.month,
"fiscalyear": invoice.invoice_date.year,
"period_number": invoice.date.month,
"fiscalyear": invoice.date.year,
}
)
statement.compute_statement()
Expand All @@ -446,8 +446,8 @@ def test_statement_purchase_round_up_amounts(self):

statement = self.statement_model.create(
{
"period_number": bill.invoice_date.month,
"fiscalyear": bill.invoice_date.year,
"period_number": bill.date.month,
"fiscalyear": bill.date.year,
}
)
statement.compute_statement()
Expand Down Expand Up @@ -478,8 +478,8 @@ def test_statement_purchase_round_down_amounts(self):

statement = self.statement_model.create(
{
"period_number": bill.invoice_date.month,
"fiscalyear": bill.invoice_date.year,
"period_number": bill.date.month,
"fiscalyear": bill.date.year,
}
)
statement.compute_statement()
Expand Down

0 comments on commit ba79f52

Please sign in to comment.