iam getting this error in my custom module , coz of this iam unable to start my server
__import__('odoo.addons.' + module_name)
File "/odoo/odoo-server/addons/transfers/__init__.py", line 4, in <module>
from . import transfers
File "/odoo/odoo-server/addons/transfers/transfers.py", line 22
@api.model
^
IndentationError: unindent does not match any outer indentation level - - -
transfers.py:
# -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from odoo import models, fields, api , _
class Transfers(models.Model):
_name ="transfers.name"
_inherit = ['mail.thread','mail.activity.mixin']
_description ="Transfer Record"
transfers_Name = fields.Char(string="Name", required = True)
transfers_ISO = fields.Char(string="ISO")
transfers_amount = fields.Integer("Amount")
notes = fields.Text(string ="Notes")
image = fields.Binary(string ="Image")
name = fields.Char(string='Order Reference', required=True, copy=False, readonly=True, states={'draft': [('readonly', False)]}, index=True, default=lambda self: _('New'))
@api.model
def create(self, vals):
if vals.get('name', _('New')) == _('New'):
vals['name'] = self.env['ir.sequence'].next_by_code('transfer.order.sequence', sequence_date=seq_date) or _('New')
result = super(Transfers, self).create(vals)
return result
sequence.xml:
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<data noupdate="1">
<!-- Sequences for sale.order -->
<record id="seq_transfers" model="ir.sequence">
<field name="name">Transfer Order</field>
<field name="code">transfer.order.sequence</field>
<field name="prefix">T0</field>
<field name="padding">5</field>
<field name="company_id" eval="False"/>
</record>
</data>
</odoo>
manifest.py:
# -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
{
'name': 'Transfers',
'version': '1.0',
'summary': 'Module for Money Transfer',
'category': 'Extra Tools',
'description':
"""
Transifex integration
=====================
This module will add a link to the Transifex project in the translation view.
The purpose of this module is to speed up translations of the main modules.
To work, Odoo uses Transifex configuration files `.tx/config` to detec the
project source. Custom modules will not be translated (as not published on
the main Transifex project).
The language the user tries to translate must be activated on the Transifex
project.
""",
'data': [
'security/ir.model.access.csv' ,
'data/sequence.xml' ,
'transfers.xml',
],
'depends': ['mail'],
'installable':True,
'application':True,
'auto_install':False,
}
someone help iam a newbie to odoo13 development
You have to read this: https://old.reddit.com/r/PythonForOdoo/