Compare commits
2 Commits
14-adapt-u
...
16.0-add-s
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7962480499 | ||
|
|
252da11a30 |
@@ -32,7 +32,8 @@
|
|||||||
'wizard/account_payment_register_views.xml',
|
'wizard/account_payment_register_views.xml',
|
||||||
'security/ir.model.access.csv',
|
'security/ir.model.access.csv',
|
||||||
# 'report/invoice_report.xml', # TODO
|
# 'report/invoice_report.xml', # TODO
|
||||||
],
|
"views/res_partner.xml",
|
||||||
|
],
|
||||||
# 'qweb': ['static/src/xml/account_payment.xml'],
|
# 'qweb': ['static/src/xml/account_payment.xml'],
|
||||||
'installable': True,
|
'installable': True,
|
||||||
# "post_init_hook": "post_init_hook",
|
# "post_init_hook": "post_init_hook",
|
||||||
|
|||||||
@@ -9,3 +9,4 @@ from . import res_partner
|
|||||||
from . import res_company
|
from . import res_company
|
||||||
#from . import product
|
#from . import product
|
||||||
from . import account_invoice_report
|
from . import account_invoice_report
|
||||||
|
from . import res_partner_bank
|
||||||
|
|||||||
21
account_usability_akretion/models/res_partner_bank.py
Normal file
21
account_usability_akretion/models/res_partner_bank.py
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
# Copyright 2015-2022 Akretion France (http://www.akretion.com/)
|
||||||
|
# @author: Mourad EL HADJ MIMOUNE <mourad.elhadj.mimoune@akretion.com>
|
||||||
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||||
|
|
||||||
|
from odoo import models
|
||||||
|
|
||||||
|
|
||||||
|
class ResPartnerBank(models.Model):
|
||||||
|
_inherit = 'res.partner.bank'
|
||||||
|
|
||||||
|
def name_get(self):
|
||||||
|
res = []
|
||||||
|
for acc in self:
|
||||||
|
name = acc.acc_number
|
||||||
|
if acc.currency_id:
|
||||||
|
name = "%s (%s)" % (name, acc.currency_id.name)
|
||||||
|
if acc.bank_id.name:
|
||||||
|
name = "%s - %s" % (name, acc.bank_id.name)
|
||||||
|
res += [(acc.id, name)]
|
||||||
|
return res
|
||||||
|
|
||||||
20
account_usability_akretion/views/res_partner.xml
Normal file
20
account_usability_akretion/views/res_partner.xml
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<!--
|
||||||
|
Copyright 2014-2024 Akretion (http://www.akretion.com/)
|
||||||
|
@author: Mourad EL HADJ MIMOUNE <mourad.elhadj.mimoune@akretion.com>
|
||||||
|
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||||
|
-->
|
||||||
|
|
||||||
|
<odoo>
|
||||||
|
|
||||||
|
<record id="view_partner_simple_form" model="ir.ui.view">
|
||||||
|
<field name="name">base_usability.title.on.partner.simplified.form</field>
|
||||||
|
<field name="model">res.partner</field>
|
||||||
|
<field name="inherit_id" ref="account.view_partner_property_form"/>
|
||||||
|
<field name="arch" type="xml">
|
||||||
|
<xpath expr="//field[@name='bank_ids']//field[@name='acc_number']" position="after">
|
||||||
|
<field name="currency_id" optional="hide"/>
|
||||||
|
</xpath>
|
||||||
|
</field>
|
||||||
|
</record>
|
||||||
|
</odoo>
|
||||||
1
stock_location_simple/__init__.py
Normal file
1
stock_location_simple/__init__.py
Normal file
@@ -0,0 +1 @@
|
|||||||
|
from . import models
|
||||||
13
stock_location_simple/__manifest__.py
Normal file
13
stock_location_simple/__manifest__.py
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
# Copyright 2024 Akretion
|
||||||
|
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
|
||||||
|
|
||||||
|
{
|
||||||
|
"name": "Stock Location Simple",
|
||||||
|
"summary": "Simplified stock.location menu",
|
||||||
|
"version": "14.0.1.0.0",
|
||||||
|
"license": "AGPL-3",
|
||||||
|
"author": "Akretion",
|
||||||
|
"website": "http://akretion.com",
|
||||||
|
"depends": ["stock"],
|
||||||
|
"data": ["views/stock_location_views.xml"],
|
||||||
|
}
|
||||||
1
stock_location_simple/models/__init__.py
Normal file
1
stock_location_simple/models/__init__.py
Normal file
@@ -0,0 +1 @@
|
|||||||
|
from . import stock_location
|
||||||
10
stock_location_simple/models/stock_location.py
Normal file
10
stock_location_simple/models/stock_location.py
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
# Copyright 2024 Akretion
|
||||||
|
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
|
||||||
|
|
||||||
|
from odoo import _, api, fields, models
|
||||||
|
|
||||||
|
|
||||||
|
class StockLocation(models.Model):
|
||||||
|
_inherit = "stock.location"
|
||||||
|
|
||||||
|
# TODO
|
||||||
90
stock_location_simple/views/stock_location_views.xml
Normal file
90
stock_location_simple/views/stock_location_views.xml
Normal file
@@ -0,0 +1,90 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<!-- Copyright 2024 Akretion
|
||||||
|
License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). -->
|
||||||
|
|
||||||
|
<odoo>
|
||||||
|
|
||||||
|
<record id="stock_location_simple_form_view" model="ir.ui.view">
|
||||||
|
<field name="name">stock.location.simple.form</field>
|
||||||
|
<field name="model">stock.location</field>
|
||||||
|
<field name="arch" type="xml">
|
||||||
|
<form string="Stock Location">
|
||||||
|
<sheet>
|
||||||
|
<div class="oe_button_box" name="button_box">
|
||||||
|
<button string="Current Stock"
|
||||||
|
class="oe_stat_button"
|
||||||
|
icon="fa-cubes" name="%(stock.location_open_quants)d" type="action"/>
|
||||||
|
</div>
|
||||||
|
<widget name="web_ribbon" title="Archived" bg_color="bg-danger" attrs="{'invisible': [('active', '=', True)]}"/>
|
||||||
|
<label for="name" class="oe_edit_only"/>
|
||||||
|
<h1>
|
||||||
|
<field name="name"/>
|
||||||
|
</h1>
|
||||||
|
<label for="location_id" class="oe_edit_only"/>
|
||||||
|
<h2>
|
||||||
|
<field name="location_id" required="1" domain="[('usage', '=', 'internal')]"/>
|
||||||
|
</h2>
|
||||||
|
|
||||||
|
<group>
|
||||||
|
<field name="active" invisible="1"/>
|
||||||
|
<field name="company_id" groups="base.group_multi_company"/>
|
||||||
|
</group>
|
||||||
|
|
||||||
|
<field name="comment" placeholder="External note..."/>
|
||||||
|
</sheet>
|
||||||
|
</form>
|
||||||
|
</field>
|
||||||
|
</record>
|
||||||
|
|
||||||
|
<record id="stock_location_simple_tree_view" model="ir.ui.view">
|
||||||
|
<field name="name">stock.location.simple.tree</field>
|
||||||
|
<field name="model">stock.location</field>
|
||||||
|
<field name="arch" type="xml">
|
||||||
|
<!-- TODO: decoration info if lockdown, if view, if linked to a warehouse -->
|
||||||
|
<tree string="Stock Location">
|
||||||
|
<field name="active" invisible="1"/>
|
||||||
|
<field name="complete_name" string="Location"/>
|
||||||
|
<field name="company_id" groups="base.group_multi_company"/>
|
||||||
|
</tree>
|
||||||
|
</field>
|
||||||
|
</record>
|
||||||
|
|
||||||
|
<record id="stock_location_simple_act_window" model="ir.actions.act_window">
|
||||||
|
<field name="name">Stock Location</field>
|
||||||
|
<field name="res_model">stock.location</field>
|
||||||
|
<field name="view_mode">tree,form</field>
|
||||||
|
<field name="domain">[("usage", "=", "internal")]</field>
|
||||||
|
</record>
|
||||||
|
|
||||||
|
<record id="stock_location_simple_act_window_tree" model="ir.actions.act_window.view" >
|
||||||
|
<field name="sequence" eval="1"/>
|
||||||
|
<field name="view_mode">tree</field>
|
||||||
|
<field name="view_id" ref="stock_location_simple_tree_view"/>
|
||||||
|
<field name="act_window_id" ref="stock_location_simple_act_window"/>
|
||||||
|
</record>
|
||||||
|
|
||||||
|
<record id="stock_location_simple_act_window_form" model="ir.actions.act_window.view" >
|
||||||
|
<field name="sequence" eval="3"/>
|
||||||
|
<field name="view_mode">form</field>
|
||||||
|
<field name="view_id" ref="stock_location_simple_form_view"/>
|
||||||
|
<field name="act_window_id" ref="stock_location_simple_act_window"/>
|
||||||
|
</record>
|
||||||
|
|
||||||
|
<record id="stock_location_simple_menu" model="ir.ui.menu">
|
||||||
|
<field name="name">Locations</field>
|
||||||
|
<field name="parent_id" ref="stock.menu_warehouse_config"/>
|
||||||
|
<field name="action" ref="stock_location_simple_act_window"/>
|
||||||
|
<field name="sequence" eval="0"/>
|
||||||
|
<field name="groups_id" eval="[(4, ref('stock.group_stock_multi_locations'))]" />
|
||||||
|
</record>
|
||||||
|
|
||||||
|
<!-- Modify name and groups_id on original stock.location menu -->
|
||||||
|
<record id="stock.menu_action_location_form" model="ir.ui.menu">
|
||||||
|
<field name="name">Locations Technical</field>
|
||||||
|
<field name="parent_id" ref="stock.menu_warehouse_config"/>
|
||||||
|
<field name="action" ref="stock.action_location_form"/>
|
||||||
|
<field name="sequence" eval="2"/>
|
||||||
|
<field name="groups_id" eval="[(4, ref('base.group_erp_manager'))]" />
|
||||||
|
</record>
|
||||||
|
|
||||||
|
</odoo>
|
||||||
Reference in New Issue
Block a user