mirror of
https://github.com/bringout/oca-ocb-l10n_asia-pacific.git
synced 2026-04-26 19:01:59 +02:00
Initial commit: L10N_Asia Pacific packages
This commit is contained in:
commit
54c86b612c
828 changed files with 58224 additions and 0 deletions
19
odoo-bringout-oca-ocb-l10n_ph/l10n_ph/models/account_move.py
Normal file
19
odoo-bringout-oca-ocb-l10n_ph/l10n_ph/models/account_move.py
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
# Part of Odoo. See LICENSE file for full copyright and licensing details.
|
||||
|
||||
from odoo import _, models
|
||||
from odoo.exceptions import UserError
|
||||
|
||||
|
||||
class AccountMove(models.Model):
|
||||
_inherit = "account.move"
|
||||
|
||||
def action_open_l10n_ph_2307_wizard(self):
|
||||
vendor_bills = self.filtered_domain([('move_type', '=', 'in_invoice')])
|
||||
if vendor_bills:
|
||||
wizard_action = self.env["ir.actions.act_window"]._for_xml_id("l10n_ph.view_l10n_ph_2307_wizard_act_window")
|
||||
wizard_action.update({
|
||||
'context': {'default_moves_to_export': vendor_bills.ids}
|
||||
})
|
||||
return wizard_action
|
||||
else:
|
||||
raise UserError(_('Only Vendor Bills are available.'))
|
||||
Loading…
Add table
Add a link
Reference in a new issue