diff options
| author | stephanchrst <stephanchrst@gmail.com> | 2022-09-08 15:16:50 +0700 |
|---|---|---|
| committer | stephanchrst <stephanchrst@gmail.com> | 2022-09-08 15:16:50 +0700 |
| commit | 8fcc5cb618d189c3fd85d5cdf8860b893f89de88 (patch) | |
| tree | 5ee8045a629403d0ece452562e6176f7976f562b | |
| parent | b4cb2913b26644f11abc6f9ea73912a6d3072918 (diff) | |
remove faktur pajak internal use (digunggung per bulan)
| -rw-r--r-- | indoteknik_custom/models/stock_picking.py | 28 | ||||
| -rw-r--r-- | indoteknik_custom/views/stock_picking.xml | 11 |
2 files changed, 3 insertions, 36 deletions
diff --git a/indoteknik_custom/models/stock_picking.py b/indoteknik_custom/models/stock_picking.py index 5142bc5f..2dea13b5 100644 --- a/indoteknik_custom/models/stock_picking.py +++ b/indoteknik_custom/models/stock_picking.py @@ -5,33 +5,11 @@ class StockPicking(models.Model): _inherit = 'stock.picking' is_internal_use = fields.Boolean('Internal Use', help='flag which is internal use or not') account_id = fields.Many2one('account.account', string='Account') - efaktur_id = fields.Many2one('vit.efaktur', string='Faktur Pajak') - is_efaktur_exported = fields.Boolean(string='Is eFaktur Exported') - date_efaktur_exported = fields.Datetime(string='eFaktur Exported Date') + # efaktur_id = fields.Many2one('vit.efaktur', string='Faktur Pajak') + # is_efaktur_exported = fields.Boolean(string='Is eFaktur Exported') + # date_efaktur_exported = fields.Datetime(string='eFaktur Exported Date') @api.onchange('picking_type_id') def _onchange_operation_type(self): self.is_internal_use = self.picking_type_id.is_internal_use return - - @api.model - def create(self, vals): - self._use_faktur(vals) - return super(StockPicking, self).create(vals) - - def write(self, vals): - self._use_faktur(vals) - return super(StockPicking, self).write(vals) - - def _use_faktur(self, vals): - if vals.get('efaktur_id', False): - self.env['vit.efaktur'].search( - [ - ('id', '=', vals['efaktur_id']) - ], - limit=1 - ).is_used = True - - if self.efaktur_id.id != vals['efaktur_id']: - self.efaktur_id.is_used = False - return True diff --git a/indoteknik_custom/views/stock_picking.xml b/indoteknik_custom/views/stock_picking.xml index 0a8dba0b..9081a58e 100644 --- a/indoteknik_custom/views/stock_picking.xml +++ b/indoteknik_custom/views/stock_picking.xml @@ -23,17 +23,6 @@ }" /> </field> - <page name="note" position="after"> - <page string="E-Faktur" name="efaktur" attrs="{'invisible': [['is_internal_use', '=', False]]}"> - <group> - <group> - <field name="efaktur_id" domain="[('is_used','=',False)]"/> - <field name="is_efaktur_exported"/> - <field name="date_efaktur_exported"/> - </group> - </group> - </page> - </page> </field> </record> </data> |
