ADD 12.0 module company_code (#77)
* ADD module company_code * FIX doc * FIX doc * Update company_code/readme/USAGE.rst Co-Authored-By: bealdav <david.beal@akretion.com>
This commit is contained in:
76
company_code/README.rst
Normal file
76
company_code/README.rst
Normal file
@@ -0,0 +1,76 @@
|
||||
============
|
||||
Company Code
|
||||
============
|
||||
|
||||
.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||
!! This file is generated by oca-gen-addon-readme !!
|
||||
!! changes will be overwritten. !!
|
||||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||
|
||||
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
|
||||
:target: https://odoo-community.org/page/development-status
|
||||
:alt: Beta
|
||||
.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png
|
||||
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
|
||||
:alt: License: AGPL-3
|
||||
.. |badge3| image:: https://img.shields.io/badge/github-akretion%2Fodoo--usability-lightgray.png?logo=github
|
||||
:target: https://github.com/akretion/odoo-usability/tree/12.0/company_code
|
||||
:alt: akretion/odoo-usability
|
||||
|
||||
|badge1| |badge2| |badge3|
|
||||
|
||||
- add `code` field to company.
|
||||
- update name_get with this field
|
||||
|
||||
**Table of contents**
|
||||
|
||||
.. contents::
|
||||
:local:
|
||||
|
||||
Usage
|
||||
=====
|
||||
|
||||
To display your company code with `name_get()` just
|
||||
write this code in your custom code according your model
|
||||
|
||||
|
||||
```python
|
||||
class ResPartner(models.Model):
|
||||
_inherit = 'res.partner'
|
||||
|
||||
def name_get(self):
|
||||
return self.env['res.company']._add_company_code(super())
|
||||
```
|
||||
|
||||
Bug Tracker
|
||||
===========
|
||||
|
||||
Bugs are tracked on `GitHub Issues <https://github.com/akretion/odoo-usability/issues>`_.
|
||||
In case of trouble, please check there if your issue has already been reported.
|
||||
If you spotted it first, help us smashing it by providing a detailed and welcomed
|
||||
`feedback <https://github.com/akretion/odoo-usability/issues/new?body=module:%20company_code%0Aversion:%2012.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
|
||||
|
||||
Do not contact contributors directly about support or help with technical issues.
|
||||
|
||||
Credits
|
||||
=======
|
||||
|
||||
Authors
|
||||
~~~~~~~
|
||||
|
||||
* Akretion
|
||||
|
||||
Contributors
|
||||
~~~~~~~~~~~~
|
||||
|
||||
David Beal <david.beal@akretion.com>
|
||||
|
||||
Maintainers
|
||||
~~~~~~~~~~~
|
||||
|
||||
|
||||
|
||||
This module is part of the `akretion/odoo-usability <https://github.com/akretion/odoo-usability/tree/12.0/company_code>`_ project on GitHub.
|
||||
|
||||
|
||||
You are welcome to contribute.
|
||||
Reference in New Issue
Block a user