classAccountMove(models.Model):_inherit="account.move"_description="Vendor Invoices"
allow_bill=fields.Boolean (string='Allow Overdue Bills')original_copy_received=fields.Boolean(string='Original Copy Received')sob_id=fields.Many2many('sob', string="SOB Numbers", store=True)
defaction_post(self):result=super(AccountMove,self).action_post()print("=================>>")ifnotself.original_copy_received :print("ffffffffffffff")date_one=self.date +timedelta(days=7)today=datetime.today().date()print("Accounting Date", date_one)print("Today Date", today)iftoday>date_oneandnotself.allow_bill:print("++++++++++++++")raiseUserError("Bill Cannot send for approval")else:print("??????????????")result=super(AccountMove,self).action_post()# self.write({'state': 'posted'})# result = super(AccountMove,self).action_post()
elifself.allow_bill:print('qqqqqqqqqqqqqqqqqqq')result=super(AccountMove,self).action_post()# self.write({'state':'posted'})returnresult
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- CRM
- e-Commerce
- Akuntansi
- Inventaris
- PoS
- Project
- MRP
Pertanyaan ini telah diberikan tanda
1511
Tampilan
Menikmati diskusi? Jangan hanya membaca, ikuti!
Buat akun sekarang untuk menikmati fitur eksklufi dan agar terlibat dengan komunitas kami!
DaftarPost Terkait | Replies | Tampilan | Aktivitas | |
---|---|---|---|---|
|
0
Feb 24
|
1316 | ||
AttributeError: 'dict' object has no attribute 'id'
Diselesaikan
|
|
1
Feb 24
|
3576 | |
|
0
Feb 24
|
1578 | ||
|
1
Jun 23
|
2725 | ||
|
1
Apr 23
|
128 |
This is not a question