mirror of
https://github.com/bringout/oca-ocb-l10n_europe.git
synced 2026-04-27 13:22:05 +02:00
19.0 vanilla
This commit is contained in:
parent
ff721d030e
commit
7721452493
1826 changed files with 124775 additions and 274114 deletions
42
odoo-bringout-oca-ocb-l10n_pl/l10n_pl/models/account_move.py
Normal file
42
odoo-bringout-oca-ocb-l10n_pl/l10n_pl/models/account_move.py
Normal file
|
|
@ -0,0 +1,42 @@
|
|||
from odoo import api, fields, models
|
||||
|
||||
|
||||
class AccountMove(models.Model):
|
||||
_inherit = 'account.move'
|
||||
|
||||
l10n_pl_vat_b_spv = fields.Boolean(
|
||||
string='B_SPV',
|
||||
help="Transfer of a single-purpose voucher effected by a taxable person acting on his/its own behalf",
|
||||
)
|
||||
l10n_pl_vat_b_spv_dostawa = fields.Boolean(
|
||||
string='B_SPV_Dostawa',
|
||||
help="Supply of goods and/or services covered by a single-purpose voucher to a taxpayer",
|
||||
)
|
||||
l10n_pl_vat_b_mpv_prowizja = fields.Boolean(
|
||||
string='B_MPV_Prowizja',
|
||||
help="Supply of agency and other services pertaining to the transfer of a single-purpose voucher",
|
||||
)
|
||||
|
||||
@api.depends('country_code')
|
||||
def _compute_show_taxable_supply_date(self):
|
||||
super()._compute_show_taxable_supply_date()
|
||||
for move in self.filtered(lambda m: m.country_code == 'PL' and m.move_type != 'entry' and (m.state == 'draft' or m.taxable_supply_date)):
|
||||
move.show_taxable_supply_date = True
|
||||
|
||||
@api.depends('country_code')
|
||||
def _compute_taxable_supply_date_placeholder(self):
|
||||
super()._compute_taxable_supply_date_placeholder()
|
||||
for move in self.filtered(lambda m: m.country_code == 'PL'):
|
||||
move.taxable_supply_date_placeholder = self.env._("Invoice Date")
|
||||
|
||||
def _get_accounting_date_source(self):
|
||||
self.ensure_one()
|
||||
if self.country_code == 'PL' and self.taxable_supply_date:
|
||||
return self.taxable_supply_date
|
||||
return super()._get_accounting_date_source()
|
||||
|
||||
def _get_invoice_currency_rate_date(self):
|
||||
self.ensure_one()
|
||||
if self.country_code == 'PL' and self.taxable_supply_date:
|
||||
return self.taxable_supply_date
|
||||
return super()._get_invoice_currency_rate_date()
|
||||
Loading…
Add table
Add a link
Reference in a new issue