mirror of
https://github.com/bringout/oca-ocb-l10n_europe.git
synced 2026-04-27 03:22:04 +02:00
19.0 vanilla
This commit is contained in:
parent
ff721d030e
commit
7721452493
1826 changed files with 124775 additions and 274114 deletions
19
odoo-bringout-oca-ocb-l10n_de/l10n_de/models/account_move.py
Normal file
19
odoo-bringout-oca-ocb-l10n_de/l10n_de/models/account_move.py
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
from odoo import models, api, fields
|
||||
|
||||
|
||||
class AccountMove(models.Model):
|
||||
_inherit = 'account.move'
|
||||
|
||||
@api.depends('country_code', 'move_type')
|
||||
def _compute_show_delivery_date(self):
|
||||
# EXTENDS 'account'
|
||||
super()._compute_show_delivery_date()
|
||||
for move in self:
|
||||
if move.country_code == 'DE':
|
||||
move.show_delivery_date = move.is_sale_document()
|
||||
|
||||
def _post(self, soft=True):
|
||||
for move in self:
|
||||
if move.country_code == 'DE' and move.is_sale_document() and not move.delivery_date:
|
||||
move.delivery_date = move.invoice_date or fields.Date.context_today(self)
|
||||
return super()._post(soft)
|
||||
Loading…
Add table
Add a link
Reference in a new issue