Merge lp:~jfb-tempo-consulting/unifield-server/US-10130 into lp:unifield-server
- US-10130
- Merge into trunk
Proposed by
jftempo
Status: | Merged |
---|---|
Merged at revision: | 6272 |
Proposed branch: | lp:~jfb-tempo-consulting/unifield-server/US-10130 |
Merge into: | lp:unifield-server |
Diff against target: |
958 lines (+115/-107) 43 files modified
bin/addons/account/account.py (+3/-3) bin/addons/account/account_move_line.py (+4/-4) bin/addons/account/invoice.py (+1/-1) bin/addons/account_override/account.py (+1/-1) bin/addons/account_override/account_move_line.py (+1/-1) bin/addons/analytic_distribution/account.py (+4/-4) bin/addons/analytic_distribution/analytic_line.py (+1/-1) bin/addons/base/ir/ir_actions.py (+1/-1) bin/addons/base/ir/workflow/workflow.py (+2/-2) bin/addons/base/res/partner/partner.py (+7/-7) bin/addons/consumption_calculation/consumption_calculation.py (+1/-1) bin/addons/consumption_calculation/expiry_calculation.py (+2/-2) bin/addons/kit/wizard/process_to_consume.py (+2/-2) bin/addons/msf_budget/msf_budget_line.py (+1/-1) bin/addons/msf_budget/report/msf_budget_summary.py (+18/-20) bin/addons/msf_currency_revaluation/account.py (+4/-2) bin/addons/msf_field_access_rights/field_access_rule_line.py (+1/-1) bin/addons/msf_homere_interface/hr.py (+1/-1) bin/addons/msf_outgoing/msf_outgoing.py (+1/-1) bin/addons/msf_outgoing/wizard/return_shipment_processor.py (+1/-0) bin/addons/msf_tools/automated_export_job.py (+1/-0) bin/addons/msf_tools/automated_import_job.py (+1/-0) bin/addons/msf_tools/report/report_stock_pipe_per_product_instance.py (+2/-2) bin/addons/product/product.py (+1/-1) bin/addons/product_attributes/product_attributes.py (+1/-1) bin/addons/purchase/purchase_order.py (+1/-1) bin/addons/purchase/wizard/purchase_line_cancel.py (+1/-1) bin/addons/purchase_allocation_report/purchase_allocation_report.py (+2/-0) bin/addons/purchase_compare_rfq/wizard/compare_rfq.py (+1/-0) bin/addons/register_accounting/account_direct_invoice_wizard.py (+2/-2) bin/addons/register_accounting/account_move_line.py (+2/-2) bin/addons/res_currency_functional/account_bank_statement_line_compute_currency.py (+1/-1) bin/addons/sale/sale_order.py (+5/-9) bin/addons/sales_followup/sale_followup.py (+1/-1) bin/addons/sourcing/sale_order_line.py (+3/-6) bin/addons/stock/stock_move.py (+4/-4) bin/addons/stock_forecast/wizard/stock_forecast.py (+3/-2) bin/addons/stock_override/report/report_stock_move.py (+4/-4) bin/addons/stock_override/stock.py (+3/-3) bin/addons/stock_override/wizard/stock_card_wizard.py (+1/-1) bin/addons/supplier_catalogue/product.py (+2/-2) bin/addons/tender_flow/tender_flow.py (+6/-5) bin/osv/fields.py (+10/-3) |
To merge this branch: | bzr merge lp:~jfb-tempo-consulting/unifield-server/US-10130 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
UniField Reviewer Team | Pending | ||
Review via email: mp+425388@code.launchpad.net |
Commit message
Description of the change
To post a comment you must log in.
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1 | === modified file 'bin/addons/account/account.py' | |||
2 | --- bin/addons/account/account.py 2022-06-22 13:46:44 +0000 | |||
3 | +++ bin/addons/account/account.py 2022-06-24 14:44:08 +0000 | |||
4 | @@ -1270,7 +1270,7 @@ | |||
5 | 1270 | 'active': fields.boolean('Active', required=True, help="If the active field is set to False, it will allow you to hide the journal period without removing it."), | 1270 | 'active': fields.boolean('Active', required=True, help="If the active field is set to False, it will allow you to hide the journal period without removing it."), |
6 | 1271 | 'state': fields.selection([('draft','Draft'), ('printed','Printed'), ('done','Done')], 'State', required=True, readonly=True, | 1271 | 'state': fields.selection([('draft','Draft'), ('printed','Printed'), ('done','Done')], 'State', required=True, readonly=True, |
7 | 1272 | help='When journal period is created. The state is \'Draft\'. If a report is printed it comes to \'Printed\' state. When all transactions are done, it comes in \'Done\' state.'), | 1272 | help='When journal period is created. The state is \'Draft\'. If a report is printed it comes to \'Printed\' state. When all transactions are done, it comes in \'Done\' state.'), |
9 | 1273 | 'fiscalyear_id': fields.related('period_id', 'fiscalyear_id', string='Fiscal Year', type='many2one', relation='account.fiscalyear'), | 1273 | 'fiscalyear_id': fields.related('period_id', 'fiscalyear_id', string='Fiscal Year', type='many2one', relation='account.fiscalyear', write_relate=False), |
10 | 1274 | 'company_id': fields.related('journal_id', 'company_id', type='many2one', relation='res.company', string='Company', store=True, readonly=True) | 1274 | 'company_id': fields.related('journal_id', 'company_id', type='many2one', relation='res.company', string='Company', store=True, readonly=True) |
11 | 1275 | } | 1275 | } |
12 | 1276 | 1276 | ||
13 | @@ -1418,13 +1418,13 @@ | |||
14 | 1418 | 'ref': fields.char('Reference', size=64), | 1418 | 'ref': fields.char('Reference', size=64), |
15 | 1419 | 'period_id': fields.many2one('account.period', 'Period', required=True, states={'posted':[('readonly',True)]}), | 1419 | 'period_id': fields.many2one('account.period', 'Period', required=True, states={'posted':[('readonly',True)]}), |
16 | 1420 | 'fiscalyear_id': fields.related('period_id', 'fiscalyear_id', type='many2one', relation='account.fiscalyear', | 1420 | 'fiscalyear_id': fields.related('period_id', 'fiscalyear_id', type='many2one', relation='account.fiscalyear', |
18 | 1421 | string='Fiscal Year', store=False), | 1421 | string='Fiscal Year', store=False, write_relate=False), |
19 | 1422 | 'journal_id': fields.many2one('account.journal', 'Journal', required=True, states={'posted':[('readonly',True)]}), | 1422 | 'journal_id': fields.many2one('account.journal', 'Journal', required=True, states={'posted':[('readonly',True)]}), |
20 | 1423 | 'state': fields.selection([('draft','Unposted'), ('posted','Posted')], 'State', required=True, readonly=True, | 1423 | 'state': fields.selection([('draft','Unposted'), ('posted','Posted')], 'State', required=True, readonly=True, |
21 | 1424 | help='All manually created new journal entry are usually in the state \'Unposted\', but you can set the option to skip that state on the related journal. In that case, they will be behave as journal entries automatically created by the system on document validation (invoices, bank statements...) and will be created in \'Posted\' state.'), | 1424 | help='All manually created new journal entry are usually in the state \'Unposted\', but you can set the option to skip that state on the related journal. In that case, they will be behave as journal entries automatically created by the system on document validation (invoices, bank statements...) and will be created in \'Posted\' state.'), |
22 | 1425 | 'line_id': fields.one2many('account.move.line', 'move_id', 'Entries', states={'posted':[('readonly',True)]}), | 1425 | 'line_id': fields.one2many('account.move.line', 'move_id', 'Entries', states={'posted':[('readonly',True)]}), |
23 | 1426 | 'to_check': fields.boolean('To Review', help='Check this box if you are unsure of that journal entry and if you want to note it as \'to be reviewed\' by an accounting expert.'), | 1426 | 'to_check': fields.boolean('To Review', help='Check this box if you are unsure of that journal entry and if you want to note it as \'to be reviewed\' by an accounting expert.'), |
25 | 1427 | 'partner_id': fields.related('line_id', 'partner_id', type="many2one", relation="res.partner", string="Partner", store=True), | 1427 | 'partner_id': fields.related('line_id', 'partner_id', type="many2one", relation="res.partner", string="Partner", store=True, write_relate=False), |
26 | 1428 | 'amount': fields.function(_amount_compute, method=True, string='Amount', digits_compute=dp.get_precision('Account'), type='float', fnct_search=_search_amount), | 1428 | 'amount': fields.function(_amount_compute, method=True, string='Amount', digits_compute=dp.get_precision('Account'), type='float', fnct_search=_search_amount), |
27 | 1429 | 'date': fields.date('Date', required=True, states={'posted':[('readonly',True)]}, select=True), | 1429 | 'date': fields.date('Date', required=True, states={'posted':[('readonly',True)]}, select=True), |
28 | 1430 | 'narration':fields.text('Narration'), | 1430 | 'narration':fields.text('Narration'), |
29 | 1431 | 1431 | ||
30 | === modified file 'bin/addons/account/account_move_line.py' | |||
31 | --- bin/addons/account/account_move_line.py 2022-04-13 12:17:56 +0000 | |||
32 | +++ bin/addons/account/account_move_line.py 2022-06-24 14:44:08 +0000 | |||
33 | @@ -534,15 +534,15 @@ | |||
34 | 534 | required=True, ondelete="cascade", domain=[('type','<>','view'), | 534 | required=True, ondelete="cascade", domain=[('type','<>','view'), |
35 | 535 | ('type', '<>', 'closed')], select=2, hide_default_menu=True), | 535 | ('type', '<>', 'closed')], select=2, hide_default_menu=True), |
36 | 536 | 'move_id': fields.many2one('account.move', 'Move', ondelete="cascade", help="The move of this entry line.", select=2, required=True), | 536 | 'move_id': fields.many2one('account.move', 'Move', ondelete="cascade", help="The move of this entry line.", select=2, required=True), |
39 | 537 | 'narration': fields.related('move_id','narration', type='text', relation='account.move', string='Narration'), | 537 | 'narration': fields.related('move_id','narration', type='text', relation='account.move', string='Narration', write_relate=False), |
40 | 538 | 'ref': fields.related('move_id', 'ref', string='Reference', type='char', size=64, store=True), | 538 | 'ref': fields.related('move_id', 'ref', string='Reference', type='char', size=64, store=True, write_relate=False), |
41 | 539 | 'statement_id': fields.many2one('account.bank.statement', 'Statement', help="The bank statement used for bank reconciliation", select=1), | 539 | 'statement_id': fields.many2one('account.bank.statement', 'Statement', help="The bank statement used for bank reconciliation", select=1), |
42 | 540 | 'reconcile_id': fields.many2one('account.move.reconcile', 'Reconcile', readonly=True, ondelete='set null', select=2), | 540 | 'reconcile_id': fields.many2one('account.move.reconcile', 'Reconcile', readonly=True, ondelete='set null', select=2), |
43 | 541 | 'reconcile_partial_id': fields.many2one('account.move.reconcile', 'Partial Reconcile', readonly=True, ondelete='set null', select=2), | 541 | 'reconcile_partial_id': fields.many2one('account.move.reconcile', 'Partial Reconcile', readonly=True, ondelete='set null', select=2), |
44 | 542 | 'amount_currency': fields.float('Amount Currency', help="The amount expressed in an optional other currency if it is a multi-currency entry.", digits_compute=dp.get_precision('Account')), | 542 | 'amount_currency': fields.float('Amount Currency', help="The amount expressed in an optional other currency if it is a multi-currency entry.", digits_compute=dp.get_precision('Account')), |
45 | 543 | 'currency_id': fields.many2one('res.currency', 'Currency', help="The optional other currency if it is a multi-currency entry."), | 543 | 'currency_id': fields.many2one('res.currency', 'Currency', help="The optional other currency if it is a multi-currency entry."), |
46 | 544 | 'period_id': fields.many2one('account.period', 'Period', required=True, select=2), | 544 | 'period_id': fields.many2one('account.period', 'Period', required=True, select=2), |
48 | 545 | 'fiscalyear_id': fields.related('period_id', 'fiscalyear_id', type='many2one', relation='account.fiscalyear', string='Fiscal Year', store=False), | 545 | 'fiscalyear_id': fields.related('period_id', 'fiscalyear_id', type='many2one', relation='account.fiscalyear', string='Fiscal Year', store=False, write_relate=False), |
49 | 546 | 'journal_id': fields.many2one('account.journal', 'Journal', required=True, select=1), | 546 | 'journal_id': fields.many2one('account.journal', 'Journal', required=True, select=1), |
50 | 547 | 'blocked': fields.boolean('Litigation', help="You can check this box to mark this journal item as a litigation with the associated partner"), | 547 | 'blocked': fields.boolean('Litigation', help="You can check this box to mark this journal item as a litigation with the associated partner"), |
51 | 548 | 'partner_id': fields.many2one('res.partner', 'Partner', select=1, ondelete='restrict'), | 548 | 'partner_id': fields.many2one('res.partner', 'Partner', select=1, ondelete='restrict'), |
52 | @@ -550,7 +550,7 @@ | |||
53 | 550 | 'date': fields.related('move_id','date', string='Effective date', type='date', required=True, select=True, | 550 | 'date': fields.related('move_id','date', string='Effective date', type='date', required=True, select=True, |
54 | 551 | store = { | 551 | store = { |
55 | 552 | 'account.move': (_get_move_lines, ['date'], 20) | 552 | 'account.move': (_get_move_lines, ['date'], 20) |
57 | 553 | }), | 553 | }, readonly=True), |
58 | 554 | 'date_created': fields.date('Creation date', select=True), | 554 | 'date_created': fields.date('Creation date', select=True), |
59 | 555 | 'analytic_lines': fields.one2many('account.analytic.line', 'move_id', 'Analytic lines'), | 555 | 'analytic_lines': fields.one2many('account.analytic.line', 'move_id', 'Analytic lines'), |
60 | 556 | 'centralisation': fields.selection([('normal','Normal'),('credit','Credit Centralisation'),('debit','Debit Centralisation'),('currency','Currency Adjustment')], 'Centralisation', size=8), | 556 | 'centralisation': fields.selection([('normal','Normal'),('credit','Credit Centralisation'),('debit','Debit Centralisation'),('currency','Currency Adjustment')], 'Centralisation', size=8), |
61 | 557 | 557 | ||
62 | === modified file 'bin/addons/account/invoice.py' | |||
63 | --- bin/addons/account/invoice.py 2022-06-20 12:17:27 +0000 | |||
64 | +++ bin/addons/account/invoice.py 2022-06-24 14:44:08 +0000 | |||
65 | @@ -1674,7 +1674,7 @@ | |||
66 | 1674 | 'note': fields.text('Notes'), | 1674 | 'note': fields.text('Notes'), |
67 | 1675 | 'account_analytic_id': fields.many2one('account.analytic.account', 'Analytic Account'), | 1675 | 'account_analytic_id': fields.many2one('account.analytic.account', 'Analytic Account'), |
68 | 1676 | 'company_id': fields.related('invoice_id','company_id',type='many2one',relation='res.company',string='Company', store=True, readonly=True), | 1676 | 'company_id': fields.related('invoice_id','company_id',type='many2one',relation='res.company',string='Company', store=True, readonly=True), |
70 | 1677 | 'partner_id': fields.related('invoice_id','partner_id',type='many2one',relation='res.partner',string='Partner',store=True) | 1677 | 'partner_id': fields.related('invoice_id','partner_id',type='many2one',relation='res.partner',string='Partner',store=True, write_relate=False) |
71 | 1678 | } | 1678 | } |
72 | 1679 | _defaults = { | 1679 | _defaults = { |
73 | 1680 | 'quantity': 1, | 1680 | 'quantity': 1, |
74 | 1681 | 1681 | ||
75 | === modified file 'bin/addons/account_override/account.py' | |||
76 | --- bin/addons/account_override/account.py 2022-05-08 14:15:29 +0000 | |||
77 | +++ bin/addons/account_override/account.py 2022-06-24 14:44:08 +0000 | |||
78 | @@ -1011,7 +1011,7 @@ | |||
79 | 1011 | hide_default_menu=True), | 1011 | hide_default_menu=True), |
80 | 1012 | 'document_date': fields.date('Document Date', size=255, required=True, help="Used for manual journal entries"), | 1012 | 'document_date': fields.date('Document Date', size=255, required=True, help="Used for manual journal entries"), |
81 | 1013 | 'journal_type': fields.related('journal_id', 'type', type='selection', selection=_journal_type_get, string="Journal Type", \ | 1013 | 'journal_type': fields.related('journal_id', 'type', type='selection', selection=_journal_type_get, string="Journal Type", \ |
83 | 1014 | help="This indicates which Journal Type is attached to this Journal Entry"), | 1014 | help="This indicates which Journal Type is attached to this Journal Entry", write_relate=False), |
84 | 1015 | 'sequence_id': fields.many2one('ir.sequence', string='Lines Sequence', ondelete='cascade', | 1015 | 'sequence_id': fields.many2one('ir.sequence', string='Lines Sequence', ondelete='cascade', |
85 | 1016 | help="This field contains the information related to the numbering of the lines of this journal entry."), | 1016 | help="This field contains the information related to the numbering of the lines of this journal entry."), |
86 | 1017 | 'manual_name': fields.char('Description', size=64, required=True), | 1017 | 'manual_name': fields.char('Description', size=64, required=True), |
87 | 1018 | 1018 | ||
88 | === modified file 'bin/addons/account_override/account_move_line.py' | |||
89 | --- bin/addons/account_override/account_move_line.py 2022-04-27 15:42:49 +0000 | |||
90 | +++ bin/addons/account_override/account_move_line.py 2022-06-24 14:44:08 +0000 | |||
91 | @@ -306,7 +306,7 @@ | |||
92 | 306 | _columns = { | 306 | _columns = { |
93 | 307 | 'source_date': fields.date('Source date', help="Date used for FX rate re-evaluation"), | 307 | 'source_date': fields.date('Source date', help="Date used for FX rate re-evaluation"), |
94 | 308 | 'move_state': fields.related('move_id', 'state', string="Move state", type="selection", selection=[('draft', 'Unposted'), ('posted', 'Posted')], | 308 | 'move_state': fields.related('move_id', 'state', string="Move state", type="selection", selection=[('draft', 'Unposted'), ('posted', 'Posted')], |
96 | 309 | help="This indicates the state of the Journal Entry."), | 309 | help="This indicates the state of the Journal Entry.", write_relate=False), |
97 | 310 | 'is_addendum_line': fields.boolean('Is an addendum line?', readonly=True, | 310 | 'is_addendum_line': fields.boolean('Is an addendum line?', readonly=True, |
98 | 311 | help="This inform account_reconciliation module that this line is an addendum line for reconciliations."), | 311 | help="This inform account_reconciliation module that this line is an addendum line for reconciliations."), |
99 | 312 | 'move_id': fields.many2one('account.move', 'Entry Sequence', ondelete="cascade", help="The move of this entry line.", select=2, required=True, readonly=True, join=True), | 312 | 'move_id': fields.many2one('account.move', 'Entry Sequence', ondelete="cascade", help="The move of this entry line.", select=2, required=True, readonly=True, join=True), |
100 | 313 | 313 | ||
101 | === modified file 'bin/addons/analytic_distribution/account.py' | |||
102 | --- bin/addons/analytic_distribution/account.py 2021-09-07 16:24:58 +0000 | |||
103 | +++ bin/addons/analytic_distribution/account.py 2022-06-24 14:44:08 +0000 | |||
104 | @@ -83,7 +83,7 @@ | |||
105 | 83 | _columns = { | 83 | _columns = { |
106 | 84 | 'account_id': fields.many2one('account.account', "G/L Account", required=True, domain="[('type', '!=', 'view'), ('is_analytic_addicted', '=', True)]", readonly=True, select=1), | 84 | 'account_id': fields.many2one('account.account', "G/L Account", required=True, domain="[('type', '!=', 'view'), ('is_analytic_addicted', '=', True)]", readonly=True, select=1), |
107 | 85 | 'destination_id': fields.many2one('account.analytic.account', "Analytical Destination Account", required=True, domain="[('type', '!=', 'view'), ('category', '=', 'DEST')]", readonly=True, select=1), | 85 | 'destination_id': fields.many2one('account.analytic.account', "Analytical Destination Account", required=True, domain="[('type', '!=', 'view'), ('category', '=', 'DEST')]", readonly=True, select=1), |
109 | 86 | 'destination_code': fields.related('destination_id', 'code', string="Analytical Destination Account", type='char', store=False), | 86 | 'destination_code': fields.related('destination_id', 'code', string="Analytical Destination Account", type='char', store=False, write_relate=False), |
110 | 87 | 'funding_pool_ids': fields.many2many('account.analytic.account', 'funding_pool_associated_destinations', 'tuple_id', 'funding_pool_id', "Funding Pools"), | 87 | 'funding_pool_ids': fields.many2many('account.analytic.account', 'funding_pool_associated_destinations', 'tuple_id', 'funding_pool_id', "Funding Pools"), |
111 | 88 | 'name': fields.function(_get_tuple_name, method=True, type='char', size=254, string="Name", readonly=True, | 88 | 'name': fields.function(_get_tuple_name, method=True, type='char', size=254, string="Name", readonly=True, |
112 | 89 | store={ | 89 | store={ |
113 | @@ -156,9 +156,9 @@ | |||
114 | 156 | _inherit = 'account.account' | 156 | _inherit = 'account.account' |
115 | 157 | 157 | ||
116 | 158 | _columns = { | 158 | _columns = { |
120 | 159 | 'user_type_code': fields.related('user_type', 'code', type="char", string="User Type Code", store=False), | 159 | 'user_type_code': fields.related('user_type', 'code', type="char", string="User Type Code", store=False, write_relate=False), |
121 | 160 | 'user_type_report_type': fields.related('user_type', 'report_type', type="char", string="User Type Report Type", store=False), | 160 | 'user_type_report_type': fields.related('user_type', 'report_type', type="char", string="User Type Report Type", store=False, write_relate=False), |
122 | 161 | 'user_type_name': fields.related('user_type', 'name', type="char", string="User Type Name", store=False), | 161 | 'user_type_name': fields.related('user_type', 'name', type="char", string="User Type Name", store=False, write_relate=False), |
123 | 162 | 'funding_pool_line_ids': fields.many2many('account.analytic.account', 'funding_pool_associated_accounts', 'account_id', 'funding_pool_id', | 162 | 'funding_pool_line_ids': fields.many2many('account.analytic.account', 'funding_pool_associated_accounts', 'account_id', 'funding_pool_id', |
124 | 163 | string='Funding Pools'), | 163 | string='Funding Pools'), |
125 | 164 | 'default_destination_id': fields.many2one('account.analytic.account', 'Default Destination', domain="[('type', '!=', 'view'), ('category', '=', 'DEST')]"), | 164 | 'default_destination_id': fields.many2one('account.analytic.account', 'Default Destination', domain="[('type', '!=', 'view'), ('category', '=', 'DEST')]"), |
126 | 165 | 165 | ||
127 | === modified file 'bin/addons/analytic_distribution/analytic_line.py' | |||
128 | --- bin/addons/analytic_distribution/analytic_line.py 2022-01-05 15:01:42 +0000 | |||
129 | +++ bin/addons/analytic_distribution/analytic_line.py 2022-06-24 14:44:08 +0000 | |||
130 | @@ -226,7 +226,7 @@ | |||
131 | 226 | help="Indicates the Journal Type of the Analytic journal item"), | 226 | help="Indicates the Journal Type of the Analytic journal item"), |
132 | 227 | 'entry_sequence': fields.function(_get_entry_sequence, method=True, type='text', string="Entry Sequence", readonly=True, store=True, select=True), | 227 | 'entry_sequence': fields.function(_get_entry_sequence, method=True, type='text', string="Entry Sequence", readonly=True, store=True, select=True), |
133 | 228 | 'period_id': fields.function(_get_period_id, fnct_search=_search_period_id, method=True, string="Period", readonly=True, type="many2one", relation="account.period", store=False), | 228 | 'period_id': fields.function(_get_period_id, fnct_search=_search_period_id, method=True, string="Period", readonly=True, type="many2one", relation="account.period", store=False), |
135 | 229 | 'fiscalyear_id': fields.related('period_id', 'fiscalyear_id', type='many2one', relation='account.fiscalyear', string='Fiscal Year', store=False), | 229 | 'fiscalyear_id': fields.related('period_id', 'fiscalyear_id', type='many2one', relation='account.fiscalyear', string='Fiscal Year', store=False, write_relate=False), |
136 | 230 | 'from_commitment_line': fields.function(_get_from_commitment_line, method=True, type='boolean', string="Commitment?"), | 230 | 'from_commitment_line': fields.function(_get_from_commitment_line, method=True, type='boolean', string="Commitment?"), |
137 | 231 | 'is_unposted': fields.function(_get_is_unposted, method=True, type='boolean', string="Unposted?"), | 231 | 'is_unposted': fields.function(_get_is_unposted, method=True, type='boolean', string="Unposted?"), |
138 | 232 | 'imported_commitment': fields.boolean(string="From imported commitment?"), | 232 | 'imported_commitment': fields.boolean(string="From imported commitment?"), |
139 | 233 | 233 | ||
140 | === modified file 'bin/addons/base/ir/ir_actions.py' | |||
141 | --- bin/addons/base/ir/ir_actions.py 2021-10-12 16:20:20 +0000 | |||
142 | +++ bin/addons/base/ir/ir_actions.py 2022-06-24 14:44:08 +0000 | |||
143 | @@ -125,7 +125,7 @@ | |||
144 | 125 | # Pending deprecation... to be replaced by report_file as this object will become the default report object (not so specific to RML anymore) | 125 | # Pending deprecation... to be replaced by report_file as this object will become the default report object (not so specific to RML anymore) |
145 | 126 | 'report_rml': fields.char('Main report file path', size=256, help="The path to the main report file (depending on Report Type) or NULL if the content is in another data field"), | 126 | 'report_rml': fields.char('Main report file path', size=256, help="The path to the main report file (depending on Report Type) or NULL if the content is in another data field"), |
146 | 127 | # temporary related field as report_rml is pending deprecation - this field will replace report_rml after v6.0 | 127 | # temporary related field as report_rml is pending deprecation - this field will replace report_rml after v6.0 |
148 | 128 | 'report_file': fields.related('report_rml', type="char", size=256, required=False, readonly=False, string='Report file', help="The path to the main report file (depending on Report Type) or NULL if the content is in another field", store=True), | 128 | 'report_file': fields.related('report_rml', type="char", size=256, required=False, readonly=False, string='Report file', help="The path to the main report file (depending on Report Type) or NULL if the content is in another field", store=True, write_relate=True), |
149 | 129 | 129 | ||
150 | 130 | 'report_sxw': fields.function(_report_sxw, method=True, type='char', string='SXW path'), | 130 | 'report_sxw': fields.function(_report_sxw, method=True, type='char', string='SXW path'), |
151 | 131 | 'report_sxw_content_data': fields.binary('SXW content'), | 131 | 'report_sxw_content_data': fields.binary('SXW content'), |
152 | 132 | 132 | ||
153 | === modified file 'bin/addons/base/ir/workflow/workflow.py' | |||
154 | --- bin/addons/base/ir/workflow/workflow.py 2018-09-28 15:47:23 +0000 | |||
155 | +++ bin/addons/base/ir/workflow/workflow.py 2022-06-24 14:44:08 +0000 | |||
156 | @@ -161,7 +161,7 @@ | |||
157 | 161 | help="Source activity. When this activity is over, the condition is tested to determine if we can start the ACT_TO activity."), | 161 | help="Source activity. When this activity is over, the condition is tested to determine if we can start the ACT_TO activity."), |
158 | 162 | 'act_to': fields.many2one('workflow.activity', 'Destination Activity', required=True, select=True, ondelete='cascade', | 162 | 'act_to': fields.many2one('workflow.activity', 'Destination Activity', required=True, select=True, ondelete='cascade', |
159 | 163 | help="The destination activity."), | 163 | help="The destination activity."), |
161 | 164 | 'wkf_id': fields.related('act_from','wkf_id', type='many2one', relation='workflow', string='Workflow', select=True), | 164 | 'wkf_id': fields.related('act_from','wkf_id', type='many2one', relation='workflow', string='Workflow', select=True, write_relate=False), |
162 | 165 | 'sequence': fields.integer('Sequence'), | 165 | 'sequence': fields.integer('Sequence'), |
163 | 166 | } | 166 | } |
164 | 167 | _defaults = { | 167 | _defaults = { |
165 | @@ -203,7 +203,7 @@ | |||
166 | 203 | _rec_name = 'state' | 203 | _rec_name = 'state' |
167 | 204 | _columns = { | 204 | _columns = { |
168 | 205 | 'act_id': fields.many2one('workflow.activity', 'Activity', required=True, ondelete="restrict", select=True), | 205 | 'act_id': fields.many2one('workflow.activity', 'Activity', required=True, ondelete="restrict", select=True), |
170 | 206 | 'wkf_id': fields.related('act_id','wkf_id', type='many2one', relation='workflow', string='Workflow'), | 206 | 'wkf_id': fields.related('act_id','wkf_id', type='many2one', relation='workflow', string='Workflow', write_relate=False), |
171 | 207 | 'subflow_id': fields.many2one('workflow.instance', 'Subflow', ondelete="cascade", select=True), | 207 | 'subflow_id': fields.many2one('workflow.instance', 'Subflow', ondelete="cascade", select=True), |
172 | 208 | 'inst_id': fields.many2one('workflow.instance', 'Instance', required=True, ondelete="cascade", select=True), | 208 | 'inst_id': fields.many2one('workflow.instance', 'Instance', required=True, ondelete="cascade", select=True), |
173 | 209 | 'state': fields.char('State', size=64, select=True), | 209 | 'state': fields.char('State', size=64, select=True), |
174 | 210 | 210 | ||
175 | === modified file 'bin/addons/base/res/partner/partner.py' | |||
176 | --- bin/addons/base/res/partner/partner.py 2022-02-02 17:13:29 +0000 | |||
177 | +++ bin/addons/base/res/partner/partner.py 2022-06-24 14:44:08 +0000 | |||
178 | @@ -132,12 +132,12 @@ | |||
179 | 132 | 'active': fields.boolean('Active'), | 132 | 'active': fields.boolean('Active'), |
180 | 133 | 'customer': fields.boolean('Customer', help="Check this box if the partner is a customer."), | 133 | 'customer': fields.boolean('Customer', help="Check this box if the partner is a customer."), |
181 | 134 | 'supplier': fields.boolean('Supplier', help="Check this box if the partner is a supplier. If it's not checked, purchase people will not see it when encoding a purchase order."), | 134 | 'supplier': fields.boolean('Supplier', help="Check this box if the partner is a supplier. If it's not checked, purchase people will not see it when encoding a purchase order."), |
186 | 135 | 'city': fields.related('address', 'city', type='char', string='City'), | 135 | 'city': fields.related('address', 'city', type='char', string='City', write_relate=True), |
187 | 136 | 'phone': fields.related('address', 'phone', type='char', string='Phone'), | 136 | 'phone': fields.related('address', 'phone', type='char', string='Phone', write_relate=True), |
188 | 137 | 'mobile': fields.related('address', 'mobile', type='char', string='Mobile'), | 137 | 'mobile': fields.related('address', 'mobile', type='char', string='Mobile', write_relate=True), |
189 | 138 | 'country': fields.related('address', 'country_id', type='many2one', relation='res.country', string='Country'), | 138 | 'country': fields.related('address', 'country_id', type='many2one', relation='res.country', string='Country', write_relate=True), |
190 | 139 | 'employee': fields.boolean('Employee', help="Check this box if the partner is an Employee."), | 139 | 'employee': fields.boolean('Employee', help="Check this box if the partner is an Employee."), |
192 | 140 | 'email': fields.related('address', 'email', type='char', size=240, string='E-mail'), | 140 | 'email': fields.related('address', 'email', type='char', size=240, string='E-mail', write_relate=True), |
193 | 141 | 'company_id': fields.many2one('res.company', 'Company', select=1), | 141 | 'company_id': fields.many2one('res.company', 'Company', select=1), |
194 | 142 | } | 142 | } |
195 | 143 | 143 | ||
196 | @@ -322,8 +322,8 @@ | |||
197 | 322 | 'fax': fields.char('Fax', size=64), | 322 | 'fax': fields.char('Fax', size=64), |
198 | 323 | 'mobile': fields.char('Mobile', size=64), | 323 | 'mobile': fields.char('Mobile', size=64), |
199 | 324 | 'birthdate': fields.char('Birthdate', size=64), | 324 | 'birthdate': fields.char('Birthdate', size=64), |
202 | 325 | 'is_customer_add': fields.related('partner_id', 'customer', type='boolean', string='Customer'), | 325 | 'is_customer_add': fields.related('partner_id', 'customer', type='boolean', string='Customer', write_relate=False), |
203 | 326 | 'is_supplier_add': fields.related('partner_id', 'supplier', type='boolean', string='Supplier'), | 326 | 'is_supplier_add': fields.related('partner_id', 'supplier', type='boolean', string='Supplier', write_relate=False), |
204 | 327 | 'active': fields.boolean('Active', help="Uncheck the active field to hide the contact."), | 327 | 'active': fields.boolean('Active', help="Uncheck the active field to hide the contact."), |
205 | 328 | # 'company_id': fields.related('partner_id','company_id',type='many2one',relation='res.company',string='Company', store=True), | 328 | # 'company_id': fields.related('partner_id','company_id',type='many2one',relation='res.company',string='Company', store=True), |
206 | 329 | 'company_id': fields.many2one('res.company', 'Company',select=1), | 329 | 'company_id': fields.many2one('res.company', 'Company',select=1), |
207 | 330 | 330 | ||
208 | === modified file 'bin/addons/consumption_calculation/consumption_calculation.py' | |||
209 | --- bin/addons/consumption_calculation/consumption_calculation.py 2022-02-08 09:54:01 +0000 | |||
210 | +++ bin/addons/consumption_calculation/consumption_calculation.py 2022-06-24 14:44:08 +0000 | |||
211 | @@ -1579,7 +1579,7 @@ | |||
212 | 1579 | 'valid_until': fields.date(string='Valid until'), | 1579 | 'valid_until': fields.date(string='Valid until'), |
213 | 1580 | 'valid_ok': fields.boolean(string='Validated', readonly=False), | 1580 | 'valid_ok': fields.boolean(string='Validated', readonly=False), |
214 | 1581 | 'mrc_id': fields.many2one('monthly.review.consumption', string='MRC', required=True, ondelete='cascade'), | 1581 | 'mrc_id': fields.many2one('monthly.review.consumption', string='MRC', required=True, ondelete='cascade'), |
216 | 1582 | 'mrc_creation_date': fields.related('mrc_id', 'creation_date', type='date', store=True), | 1582 | 'mrc_creation_date': fields.related('mrc_id', 'creation_date', type='date', store=True, write_relate=False), |
217 | 1583 | 'text_error': fields.text('Errors', readonly=True), | 1583 | 'text_error': fields.text('Errors', readonly=True), |
218 | 1584 | 'to_correct_ok': fields.function(_get_checks_all, method=True, type="boolean", string="To correct", store=False, readonly=True, multi="m"), | 1584 | 'to_correct_ok': fields.function(_get_checks_all, method=True, type="boolean", string="To correct", store=False, readonly=True, multi="m"), |
219 | 1585 | } | 1585 | } |
220 | 1586 | 1586 | ||
221 | === modified file 'bin/addons/consumption_calculation/expiry_calculation.py' | |||
222 | --- bin/addons/consumption_calculation/expiry_calculation.py 2021-09-22 13:49:41 +0000 | |||
223 | +++ bin/addons/consumption_calculation/expiry_calculation.py 2022-06-24 14:44:08 +0000 | |||
224 | @@ -192,7 +192,7 @@ | |||
225 | 192 | 'product_id': fields.many2one('product.product', string='Product', required=True), | 192 | 'product_id': fields.many2one('product.product', string='Product', required=True), |
226 | 193 | 'product_code': fields.char(string='Ref.', size=64, required=True), | 193 | 'product_code': fields.char(string='Ref.', size=64, required=True), |
227 | 194 | 'product_name': fields.char(string='Name', size=128, required=True), | 194 | 'product_name': fields.char(string='Name', size=128, required=True), |
229 | 195 | 'uom_id': fields.related('product_id', 'uom_id', string='UoM', type='many2one', relation='product.uom'), | 195 | 'uom_id': fields.related('product_id', 'uom_id', string='UoM', type='many2one', relation='product.uom', write_relate=False), |
230 | 196 | 'real_stock': fields.float(digits=(16, 2), string='Real stock', related_uom='uom_id'), | 196 | 'real_stock': fields.float(digits=(16, 2), string='Real stock', related_uom='uom_id'), |
231 | 197 | 'expired_qty': fields.float(digits=(16, 2), string='Batch exp.', related_uom='uom_id'), | 197 | 'expired_qty': fields.float(digits=(16, 2), string='Batch exp.', related_uom='uom_id'), |
232 | 198 | 'batch_number': fields.char(size=64, string='Batch'), | 198 | 'batch_number': fields.char(size=64, string='Batch'), |
233 | @@ -912,7 +912,7 @@ | |||
234 | 912 | 'location_id': fields.many2one('stock.location', string='Location'), | 912 | 'location_id': fields.many2one('stock.location', string='Location'), |
235 | 913 | 'available_qty': fields.float(digits=(16,2), string='Available Qty.', related_uom='uom_id'), | 913 | 'available_qty': fields.float(digits=(16,2), string='Available Qty.', related_uom='uom_id'), |
236 | 914 | 'expired_qty': fields.float(digits=(16,2), string='Expired Qty.', related_uom='uom_id'), | 914 | 'expired_qty': fields.float(digits=(16,2), string='Expired Qty.', related_uom='uom_id'), |
238 | 915 | 'expired_date': fields.related('lot_id', 'life_date', type='date', string='Expiry date', store=True), | 915 | 'expired_date': fields.related('lot_id', 'life_date', type='date', string='Expiry date', store=True, write_relate=False), |
239 | 916 | 'uom_id': fields.many2one('product.uom', string='UoM'), | 916 | 'uom_id': fields.many2one('product.uom', string='UoM'), |
240 | 917 | } | 917 | } |
241 | 918 | 918 | ||
242 | 919 | 919 | ||
243 | === modified file 'bin/addons/kit/wizard/process_to_consume.py' | |||
244 | --- bin/addons/kit/wizard/process_to_consume.py 2021-07-07 16:30:21 +0000 | |||
245 | +++ bin/addons/kit/wizard/process_to_consume.py 2022-06-24 14:44:08 +0000 | |||
246 | @@ -196,8 +196,8 @@ | |||
247 | 196 | 'total_selected_qty_process_to_consume': fields.function(_vals_get, method=True, type='float', string='Total Selected Qty', multi='get_vals', store=False, readonly=True), | 196 | 'total_selected_qty_process_to_consume': fields.function(_vals_get, method=True, type='float', string='Total Selected Qty', multi='get_vals', store=False, readonly=True), |
248 | 197 | 'qty_available_process_to_consume': fields.function(_vals_get, method=True, type='float', string='Available Qty', multi='get_vals', store=False), | 197 | 'qty_available_process_to_consume': fields.function(_vals_get, method=True, type='float', string='Available Qty', multi='get_vals', store=False), |
249 | 198 | # related | 198 | # related |
252 | 199 | 'line_number_process_to_consume': fields.related('to_consume_id_process_to_consume', 'line_number_to_consume', type='integer', string='Line'), | 199 | 'line_number_process_to_consume': fields.related('to_consume_id_process_to_consume', 'line_number_to_consume', type='integer', string='Line', write_relate=False), |
253 | 200 | 'consider_child_locations_process_to_consume': fields.related('kit_creation_id_process_to_consume', 'consider_child_locations_kit_creation', type='boolean', string='Consider Child Location'), | 200 | 'consider_child_locations_process_to_consume': fields.related('kit_creation_id_process_to_consume', 'consider_child_locations_kit_creation', type='boolean', string='Consider Child Location', write_relate=False), |
254 | 201 | } | 201 | } |
255 | 202 | 202 | ||
256 | 203 | process_to_consume_line() | 203 | process_to_consume_line() |
257 | 204 | 204 | ||
258 | === modified file 'bin/addons/msf_budget/msf_budget_line.py' | |||
259 | --- bin/addons/msf_budget/msf_budget_line.py 2020-02-13 14:50:37 +0000 | |||
260 | +++ bin/addons/msf_budget/msf_budget_line.py 2022-06-24 14:44:08 +0000 | |||
261 | @@ -403,7 +403,7 @@ | |||
262 | 403 | 'line_type': fields.selection([('view','View'), | 403 | 'line_type': fields.selection([('view','View'), |
263 | 404 | ('normal','Normal'), | 404 | ('normal','Normal'), |
264 | 405 | ('destination', 'Destination')], 'Line type', required=True), | 405 | ('destination', 'Destination')], 'Line type', required=True), |
266 | 406 | 'account_code': fields.related('account_id', 'code', type='char', string='Account code', size=64, store=True), | 406 | 'account_code': fields.related('account_id', 'code', type='char', string='Account code', size=64, store=True, write_relate=False), |
267 | 407 | 'account_order': fields.function(_get_account_order, type='integer', string='order', method=True, store=True), | 407 | 'account_order': fields.function(_get_account_order, type='integer', string='order', method=True, store=True), |
268 | 408 | } | 408 | } |
269 | 409 | 409 | ||
270 | 410 | 410 | ||
271 | === modified file 'bin/addons/msf_budget/report/msf_budget_summary.py' | |||
272 | --- bin/addons/msf_budget/report/msf_budget_summary.py 2015-09-11 14:50:11 +0000 | |||
273 | +++ bin/addons/msf_budget/report/msf_budget_summary.py 2022-06-24 14:44:08 +0000 | |||
274 | @@ -26,12 +26,12 @@ | |||
275 | 26 | # US-583: exclude chars in action name | 26 | # US-583: exclude chars in action name |
276 | 27 | # (chars to exclude list obtained using string.printable and testing) | 27 | # (chars to exclude list obtained using string.printable and testing) |
277 | 28 | exclude_list = "\"'`^\@~;$&#" | 28 | exclude_list = "\"'`^\@~;$&#" |
279 | 29 | 29 | ||
280 | 30 | res = text | 30 | res = text |
281 | 31 | for c in exclude_list: | 31 | for c in exclude_list: |
282 | 32 | res = res.replace(c, '') | 32 | res = res.replace(c, '') |
283 | 33 | return res | 33 | return res |
285 | 34 | 34 | ||
286 | 35 | 35 | ||
287 | 36 | class msf_budget_summary(osv.osv_memory): | 36 | class msf_budget_summary(osv.osv_memory): |
288 | 37 | _name = "msf.budget.summary" | 37 | _name = "msf.budget.summary" |
289 | @@ -85,8 +85,8 @@ | |||
290 | 85 | _columns = { | 85 | _columns = { |
291 | 86 | 'budget_id': fields.many2one('msf.budget', 'Budget', required=True), | 86 | 'budget_id': fields.many2one('msf.budget', 'Budget', required=True), |
292 | 87 | 87 | ||
295 | 88 | 'name': fields.related('budget_id', 'name', type="char", string="Budget Name", store=False), | 88 | 'name': fields.related('budget_id', 'name', type="char", string="Budget Name", store=False, write_relate=False), |
296 | 89 | 'code': fields.related('budget_id', 'code', type="char", string="Budget Code", store=False), | 89 | 'code': fields.related('budget_id', 'code', type="char", string="Budget Code", store=False, write_relate=False), |
297 | 90 | 'budget_amount': fields.function(_get_amounts, method=True, store=False, string="Budget Amount", type="float", multi="all"), | 90 | 'budget_amount': fields.function(_get_amounts, method=True, store=False, string="Budget Amount", type="float", multi="all"), |
298 | 91 | 'actual_amount': fields.function(_get_amounts, method=True, store=False, string="Actual Amount", type="float", multi="all"), | 91 | 'actual_amount': fields.function(_get_amounts, method=True, store=False, string="Actual Amount", type="float", multi="all"), |
299 | 92 | 'balance_amount': fields.function(_get_amounts, method=True, store=False, string="Balance Amount", type="float", multi="all"), # utp-857 | 92 | 'balance_amount': fields.function(_get_amounts, method=True, store=False, string="Balance Amount", type="float", multi="all"), # utp-857 |
300 | @@ -138,7 +138,6 @@ | |||
301 | 138 | if context is None: | 138 | if context is None: |
302 | 139 | context = {} | 139 | context = {} |
303 | 140 | 140 | ||
304 | 141 | mb_obj = self.pool.get('msf.budget') | ||
305 | 142 | mbs_obj = self.pool.get('msf.budget.summary') | 141 | mbs_obj = self.pool.get('msf.budget.summary') |
306 | 143 | mbsl_obj = self.pool.get('msf.budget.summary.line') | 142 | mbsl_obj = self.pool.get('msf.budget.summary.line') |
307 | 144 | 143 | ||
308 | @@ -153,13 +152,13 @@ | |||
309 | 153 | 152 | ||
310 | 154 | # get summary line data and do checks | 153 | # get summary line data and do checks |
311 | 155 | summary_br = mbs_obj.browse(cr, uid, [summary_line_id], | 154 | summary_br = mbs_obj.browse(cr, uid, [summary_line_id], |
313 | 156 | context=context)[0] | 155 | context=context)[0] |
314 | 157 | # abort if no budget found or not a last level summary node (perfs) | 156 | # abort if no budget found or not a last level summary node (perfs) |
315 | 158 | if not summary_br.budget_id: | 157 | if not summary_br.budget_id: |
316 | 159 | raise osv.except_osv(_('Error'), _('Budget not found')) | 158 | raise osv.except_osv(_('Error'), _('Budget not found')) |
317 | 160 | if summary_br.child_ids: | 159 | if summary_br.child_ids: |
318 | 161 | raise osv.except_osv(_('Warning'), | 160 | raise osv.except_osv(_('Warning'), |
320 | 162 | _('Only childest budgets are drillable')) | 161 | _('Only childest budgets are drillable')) |
321 | 163 | 162 | ||
322 | 164 | # build tree | 163 | # build tree |
323 | 165 | root_id = mbsl_obj.build_tree(cr, uid, summary_br, context=context) | 164 | root_id = mbsl_obj.build_tree(cr, uid, summary_br, context=context) |
324 | @@ -168,7 +167,7 @@ | |||
325 | 168 | name = self._budget_summary_line_label_pattern.format( | 167 | name = self._budget_summary_line_label_pattern.format( |
326 | 169 | budget_code=summary_br.budget_id.code or '') | 168 | budget_code=summary_br.budget_id.code or '') |
327 | 170 | view_id = self.pool.get('ir.model.data').get_object_reference(cr, uid, | 169 | view_id = self.pool.get('ir.model.data').get_object_reference(cr, uid, |
329 | 171 | 'msf_budget', 'view_msf_budget_summary_budget_line_tree')[1] | 170 | 'msf_budget', 'view_msf_budget_summary_budget_line_tree')[1] |
330 | 172 | res = { | 171 | res = { |
331 | 173 | 'name': filter_chars(name), | 172 | 'name': filter_chars(name), |
332 | 174 | 'type': 'ir.actions.act_window', | 173 | 'type': 'ir.actions.act_window', |
333 | @@ -196,7 +195,7 @@ | |||
334 | 196 | return res | 195 | return res |
335 | 197 | 196 | ||
336 | 198 | for r in self.read(cr, uid, ids, ['parent_id', 'name'], | 197 | for r in self.read(cr, uid, ids, ['parent_id', 'name'], |
338 | 199 | context=context): | 198 | context=context): |
339 | 200 | if r['parent_id']: | 199 | if r['parent_id']: |
340 | 201 | parts = r['name'].split(' ') | 200 | parts = r['name'].split(' ') |
341 | 202 | res[r['id']] = parts and parts[0] or '' | 201 | res[r['id']] = parts and parts[0] or '' |
342 | @@ -225,16 +224,16 @@ | |||
343 | 225 | def build_tree(self, cr, uid, summary_line_br, context=None): | 224 | def build_tree(self, cr, uid, summary_line_br, context=None): |
344 | 226 | aa_obj = self.pool.get('account.account') | 225 | aa_obj = self.pool.get('account.account') |
345 | 227 | mbl_obj = self.pool.get('msf.budget.line') | 226 | mbl_obj = self.pool.get('msf.budget.line') |
347 | 228 | 227 | ||
348 | 229 | if context is None: | 228 | if context is None: |
349 | 230 | context = {} | 229 | context = {} |
350 | 231 | context['commitment'] = 1 | 230 | context['commitment'] = 1 |
352 | 232 | 231 | ||
353 | 233 | # get account tree | 232 | # get account tree |
354 | 234 | account_ids = aa_obj.search(cr, uid, []) | 233 | account_ids = aa_obj.search(cr, uid, []) |
355 | 235 | account_tree = {} | 234 | account_tree = {} |
356 | 236 | for a in aa_obj.read(cr, uid, account_ids, ['parent_id', ], | 235 | for a in aa_obj.read(cr, uid, account_ids, ['parent_id', ], |
358 | 237 | context=context): | 236 | context=context): |
359 | 238 | account_tree[a['id']] = a['parent_id'] and a['parent_id'][0] \ | 237 | account_tree[a['id']] = a['parent_id'] and a['parent_id'][0] \ |
360 | 239 | or False | 238 | or False |
361 | 240 | 239 | ||
362 | @@ -254,7 +253,6 @@ | |||
363 | 254 | 253 | ||
364 | 255 | # build nodes from budget lines | 254 | # build nodes from budget lines |
365 | 256 | id = False | 255 | id = False |
366 | 257 | parent_level_ids = {} | ||
367 | 258 | fields = [ 'name', 'budget_amount', 'actual_amount', 'balance', ] | 256 | fields = [ 'name', 'budget_amount', 'actual_amount', 'balance', ] |
368 | 259 | 257 | ||
369 | 260 | budget_lines_ids = mbl_obj.search(cr, uid, [ | 258 | budget_lines_ids = mbl_obj.search(cr, uid, [ |
370 | @@ -264,21 +262,21 @@ | |||
371 | 264 | 262 | ||
372 | 265 | # mapping between build tree lines and budget lines by account | 263 | # mapping between build tree lines and budget lines by account |
373 | 266 | mapping = {} | 264 | mapping = {} |
375 | 267 | 265 | ||
376 | 268 | # get line truely in parent_left order | 266 | # get line truely in parent_left order |
377 | 269 | # (the native order of budget lines) | 267 | # (the native order of budget lines) |
378 | 270 | line_read = {} | 268 | line_read = {} |
379 | 271 | for bl_r in mbl_obj.read(cr, uid, budget_lines_ids, | 269 | for bl_r in mbl_obj.read(cr, uid, budget_lines_ids, |
381 | 272 | fields + [ 'account_id', 'comm_amount', ], context=context): | 270 | fields + [ 'account_id', 'comm_amount', ], context=context): |
382 | 273 | line_read[bl_r['id']] = bl_r | 271 | line_read[bl_r['id']] = bl_r |
384 | 274 | 272 | ||
385 | 275 | for bl_id in budget_lines_ids: | 273 | for bl_id in budget_lines_ids: |
386 | 276 | bl_r = line_read[bl_id] | 274 | bl_r = line_read[bl_id] |
387 | 277 | 275 | ||
388 | 278 | # get account level | 276 | # get account level |
389 | 279 | parts = bl_r['name'].split(' ') | 277 | parts = bl_r['name'].split(' ') |
390 | 280 | account = parts and parts[0] or '' | 278 | account = parts and parts[0] or '' |
392 | 281 | 279 | ||
393 | 282 | # parent mapping | 280 | # parent mapping |
394 | 283 | account_id = bl_r['account_id'][0] | 281 | account_id = bl_r['account_id'][0] |
395 | 284 | parent_id = root_id | 282 | parent_id = root_id |
396 | @@ -306,13 +304,13 @@ | |||
397 | 306 | mapping[account_id] = id | 304 | mapping[account_id] = id |
398 | 307 | if not id: | 305 | if not id: |
399 | 308 | break | 306 | break |
401 | 309 | 307 | ||
402 | 310 | return root_id | 308 | return root_id |
403 | 311 | 309 | ||
404 | 312 | def action_open_analytic_lines(self, cr, uid, ids, context): | 310 | def action_open_analytic_lines(self, cr, uid, ids, context): |
405 | 313 | def get_analytic_domain(sl_br): | 311 | def get_analytic_domain(sl_br): |
406 | 314 | cc_ids = self.pool.get('msf.budget.tools')._get_cost_center_ids(cr, | 312 | cc_ids = self.pool.get('msf.budget.tools')._get_cost_center_ids(cr, |
408 | 315 | uid, sl_br.budget_id.cost_center_id) | 313 | uid, sl_br.budget_id.cost_center_id) |
409 | 316 | 314 | ||
410 | 317 | return [ | 315 | return [ |
411 | 318 | ('cost_center_id', 'in', cc_ids), | 316 | ('cost_center_id', 'in', cc_ids), |
412 | @@ -334,7 +332,7 @@ | |||
413 | 334 | if not sl_br.budget_line_id: | 332 | if not sl_br.budget_line_id: |
414 | 335 | # no AJI drill for the root line: only from 1 level (like 6, 7) | 333 | # no AJI drill for the root line: only from 1 level (like 6, 7) |
415 | 336 | raise osv.except_osv(_('Warning'), | 334 | raise osv.except_osv(_('Warning'), |
417 | 337 | _('You can not drill analytic journal items of the root line')) | 335 | _('You can not drill analytic journal items of the root line')) |
418 | 338 | name = self._aji_label_pattern.format( | 336 | name = self._aji_label_pattern.format( |
419 | 339 | budget_code=sl_br.budget_id.code or '', | 337 | budget_code=sl_br.budget_id.code or '', |
420 | 340 | budget_line=sl_br.name or '') | 338 | budget_line=sl_br.name or '') |
421 | 341 | 339 | ||
422 | === modified file 'bin/addons/msf_currency_revaluation/account.py' | |||
423 | --- bin/addons/msf_currency_revaluation/account.py 2018-06-27 15:16:16 +0000 | |||
424 | +++ bin/addons/msf_currency_revaluation/account.py 2022-06-24 14:44:08 +0000 | |||
425 | @@ -54,10 +54,12 @@ | |||
426 | 54 | string=_("Included in revaluation?")), | 54 | string=_("Included in revaluation?")), |
427 | 55 | 'user_type_code': fields.related( | 55 | 'user_type_code': fields.related( |
428 | 56 | 'user_type', 'code', | 56 | 'user_type', 'code', |
430 | 57 | type='char', string=_(u"Type (code)")), | 57 | type='char', string=_(u"Type (code)"), |
431 | 58 | write_relate=False), | ||
432 | 58 | 'instance_level': fields.related( | 59 | 'instance_level': fields.related( |
433 | 59 | 'company_id', 'instance_id', 'level', | 60 | 'company_id', 'instance_id', 'level', |
435 | 60 | type='char', string=_(u"Instance level")), | 61 | type='char', string=_(u"Instance level"), |
436 | 62 | write_relate=False), | ||
437 | 61 | } | 63 | } |
438 | 62 | 64 | ||
439 | 63 | _defaults = {'currency_revaluation': False} | 65 | _defaults = {'currency_revaluation': False} |
440 | 64 | 66 | ||
441 | === modified file 'bin/addons/msf_field_access_rights/field_access_rule_line.py' | |||
442 | --- bin/addons/msf_field_access_rights/field_access_rule_line.py 2018-10-08 09:23:31 +0000 | |||
443 | +++ bin/addons/msf_field_access_rights/field_access_rule_line.py 2022-06-24 14:44:08 +0000 | |||
444 | @@ -46,7 +46,7 @@ | |||
445 | 46 | 'value_not_synchronized_on_write': fields.boolean('Value NOT Synchronised on Write', help='If checked, the value for this field given by a synchronisation or import is ignored when this record is editted.'), | 46 | 'value_not_synchronized_on_write': fields.boolean('Value NOT Synchronised on Write', help='If checked, the value for this field given by a synchronisation or import is ignored when this record is editted.'), |
446 | 47 | 47 | ||
447 | 48 | 'field_access_rule': fields.many2one('msf_field_access_rights.field_access_rule', 'Field Access Rule', ondelete='cascade', required=True), | 48 | 'field_access_rule': fields.many2one('msf_field_access_rights.field_access_rule', 'Field Access Rule', ondelete='cascade', required=True), |
449 | 49 | 'field_access_rule_model_id': fields.related('field_access_rule', 'model_id', type="integer", string='Field Model') | 49 | 'field_access_rule_model_id': fields.related('field_access_rule', 'model_id', type="integer", string='Field Model', write_relate=False) |
450 | 50 | } | 50 | } |
451 | 51 | 51 | ||
452 | 52 | _defaults = { | 52 | _defaults = { |
453 | 53 | 53 | ||
454 | === modified file 'bin/addons/msf_homere_interface/hr.py' | |||
455 | --- bin/addons/msf_homere_interface/hr.py 2020-10-05 15:38:34 +0000 | |||
456 | +++ bin/addons/msf_homere_interface/hr.py 2022-06-24 14:44:08 +0000 | |||
457 | @@ -142,7 +142,7 @@ | |||
458 | 142 | 'homere_uuid_key': fields.char(string='Homere field: UUID_key', size=64, readonly=True, required=False), | 142 | 'homere_uuid_key': fields.char(string='Homere field: UUID_key', size=64, readonly=True, required=False), |
459 | 143 | 'gender': fields.selection([('male', 'Male'),('female', 'Female'), ('unknown', 'Unknown')], 'Gender'), | 143 | 'gender': fields.selection([('male', 'Male'),('female', 'Female'), ('unknown', 'Unknown')], 'Gender'), |
460 | 144 | 'private_phone': fields.char(string='Private Phone', size=32), | 144 | 'private_phone': fields.char(string='Private Phone', size=32), |
462 | 145 | 'name_resource': fields.related('resource_id', 'name', string="Name", type='char', size=128, store=True), | 145 | 'name_resource': fields.related('resource_id', 'name', string="Name", type='char', size=128, store=True, write_relate=False), |
463 | 146 | 'destination_id': fields.many2one('account.analytic.account', string="Destination", domain="[('category', '=', 'DEST'), ('type', '!=', 'view'), ('state', '=', 'open')]"), | 146 | 'destination_id': fields.many2one('account.analytic.account', string="Destination", domain="[('category', '=', 'DEST'), ('type', '!=', 'view'), ('state', '=', 'open')]"), |
464 | 147 | 'allow_edition': fields.function(_get_allow_edition, method=True, type='boolean', store=False, string="Allow local employee edition?", readonly=True), | 147 | 'allow_edition': fields.function(_get_allow_edition, method=True, type='boolean', store=False, string="Allow local employee edition?", readonly=True), |
465 | 148 | 'photo': fields.binary('Photo', readonly=True), | 148 | 'photo': fields.binary('Photo', readonly=True), |
466 | 149 | 149 | ||
467 | === modified file 'bin/addons/msf_outgoing/msf_outgoing.py' | |||
468 | --- bin/addons/msf_outgoing/msf_outgoing.py 2022-04-05 07:24:53 +0000 | |||
469 | +++ bin/addons/msf_outgoing/msf_outgoing.py 2022-06-24 14:44:08 +0000 | |||
470 | @@ -2393,7 +2393,7 @@ | |||
471 | 2393 | 'in_ref': fields.char(string='IN Reference', size=1024), | 2393 | 'in_ref': fields.char(string='IN Reference', size=1024), |
472 | 2394 | 'from_manage_expired': fields.boolean(string='The Picking was created with Manage Expired Stock'), | 2394 | 'from_manage_expired': fields.boolean(string='The Picking was created with Manage Expired Stock'), |
473 | 2395 | 'requestor': fields.char(size=128, string='Requestor'), | 2395 | 'requestor': fields.char(size=128, string='Requestor'), |
475 | 2396 | 'from_ir': fields.related('sale_id', 'procurement_request', type='boolean', relation='sale.order', string='Is the linked Sale Order IR'), | 2396 | 'from_ir': fields.related('sale_id', 'procurement_request', type='boolean', relation='sale.order', string='Is the linked Sale Order IR', write_relate=False), |
476 | 2397 | } | 2397 | } |
477 | 2398 | 2398 | ||
478 | 2399 | _defaults = { | 2399 | _defaults = { |
479 | 2400 | 2400 | ||
480 | === modified file 'bin/addons/msf_outgoing/wizard/return_shipment_processor.py' | |||
481 | --- bin/addons/msf_outgoing/wizard/return_shipment_processor.py 2019-11-22 14:06:38 +0000 | |||
482 | +++ bin/addons/msf_outgoing/wizard/return_shipment_processor.py 2022-06-24 14:44:08 +0000 | |||
483 | @@ -61,6 +61,7 @@ | |||
484 | 61 | type='many2one', | 61 | type='many2one', |
485 | 62 | relation='res.partner', | 62 | relation='res.partner', |
486 | 63 | string='Customer', | 63 | string='Customer', |
487 | 64 | write_relate=False, | ||
488 | 64 | ), | 65 | ), |
489 | 65 | 'step': fields.selection( | 66 | 'step': fields.selection( |
490 | 66 | string='Step', | 67 | string='Step', |
491 | 67 | 68 | ||
492 | === modified file 'bin/addons/msf_tools/automated_export_job.py' | |||
493 | --- bin/addons/msf_tools/automated_export_job.py 2020-09-25 09:25:57 +0000 | |||
494 | +++ bin/addons/msf_tools/automated_export_job.py 2022-06-24 14:44:08 +0000 | |||
495 | @@ -312,6 +312,7 @@ | |||
496 | 312 | 'export_id': fields.related( | 312 | 'export_id': fields.related( |
497 | 313 | 'automated.export', | 313 | 'automated.export', |
498 | 314 | string='Export', | 314 | string='Export', |
499 | 315 | write_relate=False, | ||
500 | 315 | ), | 316 | ), |
501 | 316 | } | 317 | } |
502 | 317 | 318 | ||
503 | 318 | 319 | ||
504 | === modified file 'bin/addons/msf_tools/automated_import_job.py' | |||
505 | --- bin/addons/msf_tools/automated_import_job.py 2021-04-13 16:03:28 +0000 | |||
506 | +++ bin/addons/msf_tools/automated_import_job.py 2022-06-24 14:44:08 +0000 | |||
507 | @@ -698,6 +698,7 @@ | |||
508 | 698 | 'import_id': fields.related( | 698 | 'import_id': fields.related( |
509 | 699 | 'automated.import', | 699 | 'automated.import', |
510 | 700 | string='Import', | 700 | string='Import', |
511 | 701 | write_relate=False, | ||
512 | 701 | ), | 702 | ), |
513 | 702 | } | 703 | } |
514 | 703 | 704 | ||
515 | 704 | 705 | ||
516 | === modified file 'bin/addons/msf_tools/report/report_stock_pipe_per_product_instance.py' | |||
517 | --- bin/addons/msf_tools/report/report_stock_pipe_per_product_instance.py 2020-11-02 09:51:10 +0000 | |||
518 | +++ bin/addons/msf_tools/report/report_stock_pipe_per_product_instance.py 2022-06-24 14:44:08 +0000 | |||
519 | @@ -139,9 +139,9 @@ | |||
520 | 139 | _columns = { | 139 | _columns = { |
521 | 140 | 'stock_pipe_per_product_instance_id': fields.many2one('stock.pipe.per.product.instance', string='Report Stock & Pipe per Product and per Instance'), | 140 | 'stock_pipe_per_product_instance_id': fields.many2one('stock.pipe.per.product.instance', string='Report Stock & Pipe per Product and per Instance'), |
522 | 141 | 'product_id': fields.many2one('product.product', string='Product'), | 141 | 'product_id': fields.many2one('product.product', string='Product'), |
524 | 142 | 'uom_id': fields.related('product_id', 'uom_id', type='many2one', relation='product.uom', store=True, string='UoM'), | 142 | 'uom_id': fields.related('product_id', 'uom_id', type='many2one', relation='product.uom', store=True, string='UoM', write_relate=False), |
525 | 143 | 'instance_id': fields.many2one('msf.instance', 'Instance/Mission'), | 143 | 'instance_id': fields.many2one('msf.instance', 'Instance/Mission'), |
527 | 144 | 'uf_state': fields.related('product_id', 'state', type='many2one', relation='product.status', store=True, string='HQ UniField Status'), | 144 | 'uf_state': fields.related('product_id', 'state', type='many2one', relation='product.status', store=True, string='HQ UniField Status', write_relate=False), |
528 | 145 | 'ud_state': fields.related('product_id', 'state_ud', type='selection', selection=[('valid', 'Valid'), ('outdated', 'Outdated'), ('discontinued', 'Discontinued'), ('phase_out', 'Phase Out'), ('stopped', 'Stopped'), ('archived', 'Archived'), ('forbidden', 'Forbidden')], store=True, write_relate=False, string='HQ UniData Status'), | 145 | 'ud_state': fields.related('product_id', 'state_ud', type='selection', selection=[('valid', 'Valid'), ('outdated', 'Outdated'), ('discontinued', 'Discontinued'), ('phase_out', 'Phase Out'), ('stopped', 'Stopped'), ('archived', 'Archived'), ('forbidden', 'Forbidden')], store=True, write_relate=False, string='HQ UniData Status'), |
529 | 146 | 'instance_stock': fields.float('Instance stock', related_uom='uom_id'), | 146 | 'instance_stock': fields.float('Instance stock', related_uom='uom_id'), |
530 | 147 | 'pipe_qty': fields.float('Pipeline Qty', related_uom='uom_id'), | 147 | 'pipe_qty': fields.float('Pipeline Qty', related_uom='uom_id'), |
531 | 148 | 148 | ||
532 | === modified file 'bin/addons/product/product.py' | |||
533 | --- bin/addons/product/product.py 2021-08-06 15:49:01 +0000 | |||
534 | +++ bin/addons/product/product.py 2022-06-24 14:44:08 +0000 | |||
535 | @@ -1005,7 +1005,7 @@ | |||
536 | 1005 | 'product_name': fields.char('Supplier Product Name', size=128, help="This supplier's product name will be used when printing a request for quotation. Keep empty to use the internal one."), | 1005 | 'product_name': fields.char('Supplier Product Name', size=128, help="This supplier's product name will be used when printing a request for quotation. Keep empty to use the internal one."), |
537 | 1006 | 'product_code': fields.char('Supplier Product Code', size=64, help="This supplier's product code will be used when printing a request for quotation. Keep empty to use the internal one."), | 1006 | 'product_code': fields.char('Supplier Product Code', size=64, help="This supplier's product code will be used when printing a request for quotation. Keep empty to use the internal one."), |
538 | 1007 | 'sequence' : fields.integer('Sequence', help="Assigns the priority to the list of product supplier."), | 1007 | 'sequence' : fields.integer('Sequence', help="Assigns the priority to the list of product supplier."), |
540 | 1008 | 'product_uom': fields.related('product_id', 'uom_id', string="Supplier UoM", type='many2one', relation='product.uom', help="Choose here the Unit of Measure in which the prices and quantities are expressed below."), | 1008 | 'product_uom': fields.related('product_id', 'uom_id', string="Supplier UoM", type='many2one', relation='product.uom', help="Choose here the Unit of Measure in which the prices and quantities are expressed below.", write_relate=False), |
541 | 1009 | 'min_qty': fields.float('Minimal Quantity', required=False, help="The minimal quantity to purchase to this supplier, expressed in the supplier Product UoM if not empty, in the default unit of measure of the product otherwise.", related_uom='product_uom'), | 1009 | 'min_qty': fields.float('Minimal Quantity', required=False, help="The minimal quantity to purchase to this supplier, expressed in the supplier Product UoM if not empty, in the default unit of measure of the product otherwise.", related_uom='product_uom'), |
542 | 1010 | 'qty': fields.function(_calc_qty, method=True, store=True, type='float', string='Quantity', multi="qty", help="This is a quantity which is converted into Default Uom.", related_uom='product_uom'), | 1010 | 'qty': fields.function(_calc_qty, method=True, store=True, type='float', string='Quantity', multi="qty", help="This is a quantity which is converted into Default Uom.", related_uom='product_uom'), |
543 | 1011 | 'product_id' : fields.many2one('product.template', 'Product', required=True, ondelete='cascade', select=True), | 1011 | 'product_id' : fields.many2one('product.template', 'Product', required=True, ondelete='cascade', select=True), |
544 | 1012 | 1012 | ||
545 | === modified file 'bin/addons/product_attributes/product_attributes.py' | |||
546 | --- bin/addons/product_attributes/product_attributes.py 2022-04-01 08:58:53 +0000 | |||
547 | +++ bin/addons/product_attributes/product_attributes.py 2022-06-24 14:44:08 +0000 | |||
548 | @@ -994,7 +994,7 @@ | |||
549 | 994 | 'product.product': (lambda self, cr, uid, ids, c=None: ids, ['controlled_substance'], 10), | 994 | 'product.product': (lambda self, cr, uid, ids, c=None: ids, ['controlled_substance'], 10), |
550 | 995 | } | 995 | } |
551 | 996 | ), | 996 | ), |
553 | 997 | 'uom_category_id': fields.related('uom_id', 'category_id', string='Uom Category', type='many2one', relation='product.uom.categ'), | 997 | 'uom_category_id': fields.related('uom_id', 'category_id', string='Uom Category', type='many2one', relation='product.uom.categ', write_relate=False), |
554 | 998 | 'no_external': fields.function(_get_restriction, method=True, type='boolean', string='External partners orders', readonly=True, multi='restriction', | 998 | 'no_external': fields.function(_get_restriction, method=True, type='boolean', string='External partners orders', readonly=True, multi='restriction', |
555 | 999 | store={'product.product': (lambda self, cr, uid, ids, c=None: ids, ['international_status', 'state'], 20), | 999 | store={'product.product': (lambda self, cr, uid, ids, c=None: ids, ['international_status', 'state'], 20), |
556 | 1000 | 'product.status': (_get_product_status, ['no_external'], 10), | 1000 | 'product.status': (_get_product_status, ['no_external'], 10), |
557 | 1001 | 1001 | ||
558 | === modified file 'bin/addons/purchase/purchase_order.py' | |||
559 | --- bin/addons/purchase/purchase_order.py 2022-03-22 09:01:13 +0000 | |||
560 | +++ bin/addons/purchase/purchase_order.py 2022-06-24 14:44:08 +0000 | |||
561 | @@ -841,7 +841,7 @@ | |||
562 | 841 | 'unallocation_ok': fields.boolean(string='Unallocated PO'), | 841 | 'unallocation_ok': fields.boolean(string='Unallocated PO'), |
563 | 842 | 'partner_ref': fields.char('Supplier Reference', size=128), | 842 | 'partner_ref': fields.char('Supplier Reference', size=128), |
564 | 843 | 'short_partner_ref': fields.function(_get_short_partner_ref, method=True, string='Supplier Reference', type='char', size=64, store=False), | 843 | 'short_partner_ref': fields.function(_get_short_partner_ref, method=True, string='Supplier Reference', type='char', size=64, store=False), |
566 | 844 | 'product_id': fields.related('order_line', 'product_id', type='many2one', relation='product.product', string='Product'), | 844 | 'product_id': fields.related('order_line', 'product_id', type='many2one', relation='product.product', string='Product', write_relate=False), |
567 | 845 | 'no_line': fields.function(_get_no_line, method=True, type='boolean', string='No line'), | 845 | 'no_line': fields.function(_get_no_line, method=True, type='boolean', string='No line'), |
568 | 846 | 'active': fields.boolean('Active', readonly=True), | 846 | 'active': fields.boolean('Active', readonly=True), |
569 | 847 | 'po_from_ir': fields.function(_po_from_x, method=True, type='boolean', string='Is PO from IR ?', multi='po_from_x'), | 847 | 'po_from_ir': fields.function(_po_from_x, method=True, type='boolean', string='Is PO from IR ?', multi='po_from_x'), |
570 | 848 | 848 | ||
571 | === modified file 'bin/addons/purchase/wizard/purchase_line_cancel.py' | |||
572 | --- bin/addons/purchase/wizard/purchase_line_cancel.py 2018-09-05 07:52:27 +0000 | |||
573 | +++ bin/addons/purchase/wizard/purchase_line_cancel.py 2022-06-24 14:44:08 +0000 | |||
574 | @@ -28,7 +28,7 @@ | |||
575 | 28 | 28 | ||
576 | 29 | _columns = { | 29 | _columns = { |
577 | 30 | 'pol_id': fields.many2one('purchase.order.line', string='PO line to delete'), | 30 | 'pol_id': fields.many2one('purchase.order.line', string='PO line to delete'), |
579 | 31 | 'linked_sol_id': fields.related('pol_id', 'linked_sol_id', type='many2one', relation='sale.order.line', string='SO line'), | 31 | 'linked_sol_id': fields.related('pol_id', 'linked_sol_id', type='many2one', relation='sale.order.line', string='SO line', write_relate=False), |
580 | 32 | } | 32 | } |
581 | 33 | 33 | ||
582 | 34 | def cancel_pol(self, cr, uid, ids, resource=False, context=None): | 34 | def cancel_pol(self, cr, uid, ids, resource=False, context=None): |
583 | 35 | 35 | ||
584 | === modified file 'bin/addons/purchase_allocation_report/purchase_allocation_report.py' | |||
585 | --- bin/addons/purchase_allocation_report/purchase_allocation_report.py 2018-09-17 16:14:57 +0000 | |||
586 | +++ bin/addons/purchase_allocation_report/purchase_allocation_report.py 2022-06-24 14:44:08 +0000 | |||
587 | @@ -71,6 +71,7 @@ | |||
588 | 71 | size=64, | 71 | size=64, |
589 | 72 | string='Product Code', | 72 | string='Product Code', |
590 | 73 | store=False, | 73 | store=False, |
591 | 74 | write_relate=False, | ||
592 | 74 | ), | 75 | ), |
593 | 75 | 'product_name': fields.related( | 76 | 'product_name': fields.related( |
594 | 76 | 'product_id', | 77 | 'product_id', |
595 | @@ -79,6 +80,7 @@ | |||
596 | 79 | size=128, | 80 | size=128, |
597 | 80 | string='Product Name', | 81 | string='Product Name', |
598 | 81 | store=False, | 82 | store=False, |
599 | 83 | write_relate=False, | ||
600 | 82 | ), | 84 | ), |
601 | 83 | 'product_qty': fields.float(digits=(16,2), string='Qty', related_uom='uom_id'), | 85 | 'product_qty': fields.float(digits=(16,2), string='Qty', related_uom='uom_id'), |
602 | 84 | 'uom_id': fields.many2one('product.uom', string='UoM'), | 86 | 'uom_id': fields.many2one('product.uom', string='UoM'), |
603 | 85 | 87 | ||
604 | === modified file 'bin/addons/purchase_compare_rfq/wizard/compare_rfq.py' | |||
605 | --- bin/addons/purchase_compare_rfq/wizard/compare_rfq.py 2020-05-15 14:18:40 +0000 | |||
606 | +++ bin/addons/purchase_compare_rfq/wizard/compare_rfq.py 2022-06-24 14:44:08 +0000 | |||
607 | @@ -436,6 +436,7 @@ | |||
608 | 436 | string='Selected supplier', | 436 | string='Selected supplier', |
609 | 437 | type='char', | 437 | type='char', |
610 | 438 | size=256, | 438 | size=256, |
611 | 439 | write_relate=False, | ||
612 | 439 | ), | 440 | ), |
613 | 440 | } | 441 | } |
614 | 441 | 442 | ||
615 | 442 | 443 | ||
616 | === modified file 'bin/addons/register_accounting/account_direct_invoice_wizard.py' | |||
617 | --- bin/addons/register_accounting/account_direct_invoice_wizard.py 2022-04-11 13:41:22 +0000 | |||
618 | +++ bin/addons/register_accounting/account_direct_invoice_wizard.py 2022-06-24 14:44:08 +0000 | |||
619 | @@ -84,7 +84,7 @@ | |||
620 | 84 | readonly=True, states={'draft':[('readonly',False)]}), | 84 | readonly=True, states={'draft':[('readonly',False)]}), |
621 | 85 | 'number': fields.related('move_id','name', type='char', | 85 | 'number': fields.related('move_id','name', type='char', |
622 | 86 | readonly=True, size=64, relation='account.move', store=True, | 86 | readonly=True, size=64, relation='account.move', store=True, |
624 | 87 | string='Number'), | 87 | string='Number', write_relate=False), |
625 | 88 | 'origin': fields.char('Source Document', size=512, | 88 | 'origin': fields.char('Source Document', size=512, |
626 | 89 | help="Referencie of the document that produced this invoice.", | 89 | help="Referencie of the document that produced this invoice.", |
627 | 90 | readonly=True, states={'draft':[('readonly',False)]}), | 90 | readonly=True, states={'draft':[('readonly',False)]}), |
628 | @@ -626,7 +626,7 @@ | |||
629 | 626 | 'company_id': fields.related('invoice_wizard_id','company_id',type='many2one', | 626 | 'company_id': fields.related('invoice_wizard_id','company_id',type='many2one', |
630 | 627 | relation='res.company', string='Company', store=True, readonly=True), | 627 | relation='res.company', string='Company', store=True, readonly=True), |
631 | 628 | 'partner_id': fields.related('invoice_wizard_id','partner_id',type='many2one', | 628 | 'partner_id': fields.related('invoice_wizard_id','partner_id',type='many2one', |
633 | 629 | relation='res.partner', string='Partner',store=True), | 629 | relation='res.partner', string='Partner',store=True, write_relate=False), |
634 | 630 | 'inactive_error': fields.function(_get_inactive_product, method=True, | 630 | 'inactive_error': fields.function(_get_inactive_product, method=True, |
635 | 631 | type='char', string='Comment', store=False, multi='inactive'), | 631 | type='char', string='Comment', store=False, multi='inactive'), |
636 | 632 | 'newline': fields.boolean('New line'), | 632 | 'newline': fields.boolean('New line'), |
637 | 633 | 633 | ||
638 | === modified file 'bin/addons/register_accounting/account_move_line.py' | |||
639 | --- bin/addons/register_accounting/account_move_line.py 2020-02-13 14:50:37 +0000 | |||
640 | +++ bin/addons/register_accounting/account_move_line.py 2022-06-24 14:44:08 +0000 | |||
641 | @@ -246,7 +246,7 @@ | |||
642 | 246 | 'third_parties': fields.function(_get_third_parties, type='reference', method=True, | 246 | 'third_parties': fields.function(_get_third_parties, type='reference', method=True, |
643 | 247 | string="Third Parties", selection=[('res.partner', 'Partner'), ('account.journal', 'Journal'), ('hr.employee', 'Employee')], | 247 | string="Third Parties", selection=[('res.partner', 'Partner'), ('account.journal', 'Journal'), ('hr.employee', 'Employee')], |
644 | 248 | help="To use for python code when registering", multi="third_parties_key"), | 248 | help="To use for python code when registering", multi="third_parties_key"), |
646 | 249 | 'supplier_invoice_ref': fields.related('invoice', 'name', type='char', size=64, string="Supplier inv.ref.", store=False), | 249 | 'supplier_invoice_ref': fields.related('invoice', 'name', type='char', size=64, string="Supplier inv.ref.", store=False, write_relate=False), |
647 | 250 | 'imported_invoice_line_ids': fields.many2many('account.bank.statement.line', 'imported_invoice', 'move_line_id', 'st_line_id', | 250 | 'imported_invoice_line_ids': fields.many2many('account.bank.statement.line', 'imported_invoice', 'move_line_id', 'st_line_id', |
648 | 251 | string="Imported Invoices", required=False, readonly=True), | 251 | string="Imported Invoices", required=False, readonly=True), |
649 | 252 | 'from_import_invoice_ml_id': fields.many2one('account.move.line', 'From import invoice', select=1, | 252 | 'from_import_invoice_ml_id': fields.many2one('account.move.line', 'From import invoice', select=1, |
650 | @@ -265,7 +265,7 @@ | |||
651 | 265 | 'account.bank.statement.line': (_get_linked_statement, None, 10), | 265 | 'account.bank.statement.line': (_get_linked_statement, None, 10), |
652 | 266 | }), | 266 | }), |
653 | 267 | 'partner_txt': fields.text(string="Third Parties", help="Help user to display and sort Third Parties"), | 267 | 'partner_txt': fields.text(string="Third Parties", help="Help user to display and sort Third Parties"), |
655 | 268 | 'partner_identification': fields.related('employee_id', 'identification_id', type='char', string='Id No', size=32), | 268 | 'partner_identification': fields.related('employee_id', 'identification_id', type='char', string='Id No', size=32, write_relate=False), |
656 | 269 | 'down_payment_id': fields.many2one('purchase.order', string="Purchase Order for Down Payment", readonly=True, ondelete='cascade'), | 269 | 'down_payment_id': fields.many2one('purchase.order', string="Purchase Order for Down Payment", readonly=True, ondelete='cascade'), |
657 | 270 | 'down_payment_amount': fields.float(string='Down Payment used amount', readonly=True), | 270 | 'down_payment_amount': fields.float(string='Down Payment used amount', readonly=True), |
658 | 271 | 'transfer_amount': fields.float(string="Transfer amount", readonly=True, required=False), | 271 | 'transfer_amount': fields.float(string="Transfer amount", readonly=True, required=False), |
659 | 272 | 272 | ||
660 | === modified file 'bin/addons/res_currency_functional/account_bank_statement_line_compute_currency.py' | |||
661 | --- bin/addons/res_currency_functional/account_bank_statement_line_compute_currency.py 2019-10-30 16:33:21 +0000 | |||
662 | +++ bin/addons/res_currency_functional/account_bank_statement_line_compute_currency.py 2022-06-24 14:44:08 +0000 | |||
663 | @@ -50,7 +50,7 @@ | |||
664 | 50 | return res | 50 | return res |
665 | 51 | 51 | ||
666 | 52 | _columns = { | 52 | _columns = { |
668 | 53 | 'currency_id': fields.related('statement_id', 'currency', type="many2one", relation="res.currency", string="Currency", store=False), | 53 | 'currency_id': fields.related('statement_id', 'currency', type="many2one", relation="res.currency", string="Currency", store=False, write_relate=False), |
669 | 54 | 'functional_in': fields.function(_compute, method=True, store=False, type='float', string='Func. In', multi='amount_in, amount_out'), | 54 | 'functional_in': fields.function(_compute, method=True, store=False, type='float', string='Func. In', multi='amount_in, amount_out'), |
670 | 55 | 'functional_out': fields.function(_compute, method=True, store=False, type='float', string='Func. Out', multi='amount_in, amount_out'), | 55 | 'functional_out': fields.function(_compute, method=True, store=False, type='float', string='Func. Out', multi='amount_in, amount_out'), |
671 | 56 | 'functional_currency_id': fields.related('company_id', 'currency_id', type="many2one", relation="res.currency", string="Func. Currency", store=False, write_relate=False), | 56 | 'functional_currency_id': fields.related('company_id', 'currency_id', type="many2one", relation="res.currency", string="Func. Currency", store=False, write_relate=False), |
672 | 57 | 57 | ||
673 | === modified file 'bin/addons/sale/sale_order.py' | |||
674 | --- bin/addons/sale/sale_order.py 2022-06-20 12:17:27 +0000 | |||
675 | +++ bin/addons/sale/sale_order.py 2022-06-24 14:44:08 +0000 | |||
676 | @@ -694,7 +694,7 @@ | |||
677 | 694 | 'split_type_sale_order': fields.selection(SALE_ORDER_SPLIT_SELECTION, required=True, readonly=True, internal=1), | 694 | 'split_type_sale_order': fields.selection(SALE_ORDER_SPLIT_SELECTION, required=True, readonly=True, internal=1), |
678 | 695 | 'original_so_id_sale_order': fields.many2one('sale.order', 'Original Field Order', readonly=True), | 695 | 'original_so_id_sale_order': fields.many2one('sale.order', 'Original Field Order', readonly=True), |
679 | 696 | 'active': fields.boolean('Active', readonly=True), | 696 | 'active': fields.boolean('Active', readonly=True), |
681 | 697 | 'product_id': fields.related('order_line', 'product_id', type='many2one', relation='product.product', string='Product'), | 697 | 'product_id': fields.related('order_line', 'product_id', type='many2one', relation='product.product', string='Product', write_relate=False), |
682 | 698 | 'no_line': fields.function(_get_no_line, method=True, type='boolean', string='No line'), | 698 | 'no_line': fields.function(_get_no_line, method=True, type='boolean', string='No line'), |
683 | 699 | 'manually_corrected': fields.function(_get_manually_corrected, method=True, type='boolean', string='Manually corrected'), | 699 | 'manually_corrected': fields.function(_get_manually_corrected, method=True, type='boolean', string='Manually corrected'), |
684 | 700 | 'is_a_counterpart': fields.boolean('Counterpart?', help="This field is only for indicating that the order is a counterpart"), | 700 | 'is_a_counterpart': fields.boolean('Counterpart?', help="This field is only for indicating that the order is a counterpart"), |
685 | @@ -2211,8 +2211,8 @@ | |||
686 | 2211 | 'display_resourced_orig_line': fields.function(_get_display_resourced_orig_line, method=True, type='char', readonly=True, string='Original FO/IR line', help='Original line from which the current one has been cancel and ressourced'), | 2211 | 'display_resourced_orig_line': fields.function(_get_display_resourced_orig_line, method=True, type='char', readonly=True, string='Original FO/IR line', help='Original line from which the current one has been cancel and ressourced'), |
687 | 2212 | 'resourced_at_state': fields.char('Resourced at state', size=128, help='The state of the original line when the resourced line has been created'), | 2212 | 'resourced_at_state': fields.char('Resourced at state', size=128, help='The state of the original line when the resourced line has been created'), |
688 | 2213 | 'stock_take_date': fields.date('Date of Stock Take', required=False), | 2213 | 'stock_take_date': fields.date('Date of Stock Take', required=False), |
691 | 2214 | 'order_partner_id': fields.related('order_id', 'partner_id', type='many2one', relation='res.partner', store=True, string='Customer'), | 2214 | 'order_partner_id': fields.related('order_id', 'partner_id', type='many2one', relation='res.partner', store=True, string='Customer', write_relate=False), |
692 | 2215 | 'salesman_id':fields.related('order_id', 'user_id', type='many2one', relation='res.users', store=True, string='Salesman'), | 2215 | 'salesman_id':fields.related('order_id', 'user_id', type='many2one', relation='res.users', store=True, string='Salesman', write_relate=False), |
693 | 2216 | 'company_id': fields.related('order_id', 'company_id', type='many2one', relation='res.company', string='Company', store=True, readonly=True), | 2216 | 'company_id': fields.related('order_id', 'company_id', type='many2one', relation='res.company', string='Company', store=True, readonly=True), |
694 | 2217 | 'is_line_split': fields.boolean(string='This line is a split line?'), # UTP-972: Use boolean to indicate if the line is a split line | 2217 | 'is_line_split': fields.boolean(string='This line is a split line?'), # UTP-972: Use boolean to indicate if the line is a split line |
695 | 2218 | 'partner_id': fields.related('order_id', 'partner_id', relation="res.partner", readonly=True, type="many2one", string="Customer"), | 2218 | 'partner_id': fields.related('order_id', 'partner_id', relation="res.partner", readonly=True, type="many2one", string="Customer"), |
696 | @@ -3845,12 +3845,7 @@ | |||
697 | 3845 | string='Purchase order line', | 3845 | string='Purchase order line', |
698 | 3846 | ondelete='cascade', | 3846 | ondelete='cascade', |
699 | 3847 | ), | 3847 | ), |
706 | 3848 | 'po_id': fields.related( | 3848 | 'po_id': fields.related('po_line_id', 'order_id', type='many2one', relation='purchase.order', write_relate=False), |
701 | 3849 | 'po_line_id', | ||
702 | 3850 | 'order_id', | ||
703 | 3851 | type='many2one', | ||
704 | 3852 | relation='purchase.order', | ||
705 | 3853 | ), | ||
707 | 3854 | } | 3849 | } |
708 | 3855 | 3850 | ||
709 | 3856 | expected_sale_order_line() | 3851 | expected_sale_order_line() |
710 | @@ -4036,6 +4031,7 @@ | |||
711 | 4036 | type='selection', | 4031 | type='selection', |
712 | 4037 | string='Order state', | 4032 | string='Order state', |
713 | 4038 | selection=SALE_ORDER_STATE_SELECTION, | 4033 | selection=SALE_ORDER_STATE_SELECTION, |
714 | 4034 | write_relate=False, | ||
715 | 4039 | ), | 4035 | ), |
716 | 4040 | 'action': fields.selection( | 4036 | 'action': fields.selection( |
717 | 4041 | selection=[ | 4037 | selection=[ |
718 | 4042 | 4038 | ||
719 | === modified file 'bin/addons/sales_followup/sale_followup.py' | |||
720 | --- bin/addons/sales_followup/sale_followup.py 2021-03-19 17:44:09 +0000 | |||
721 | +++ bin/addons/sales_followup/sale_followup.py 2022-06-24 14:44:08 +0000 | |||
722 | @@ -739,7 +739,7 @@ | |||
723 | 739 | 'procure_method': fields.related('line_id', 'type', type='selection', selection=[('make_to_stock','From stock'), ('make_to_order','On order')], readonly=True, string='Proc. Method'), | 739 | 'procure_method': fields.related('line_id', 'type', type='selection', selection=[('make_to_stock','From stock'), ('make_to_order','On order')], readonly=True, string='Proc. Method'), |
724 | 740 | 'po_cft': fields.related('line_id', 'po_cft', type='selection', selection=[('po','PO'), ('dpo', 'DPO'), ('cft','CFT'), ('pli', 'PLI')], readonly=True, string='PO/CFT'), | 740 | 'po_cft': fields.related('line_id', 'po_cft', type='selection', selection=[('po','PO'), ('dpo', 'DPO'), ('cft','CFT'), ('pli', 'PLI')], readonly=True, string='PO/CFT'), |
725 | 741 | 'line_number': fields.related('line_id', 'line_number', string='Order line', readonly=True, type='integer'), | 741 | 'line_number': fields.related('line_id', 'line_number', string='Order line', readonly=True, type='integer'), |
727 | 742 | 'product_id': fields.related('line_id', 'product_id', string='Product Code', readondy=True, | 742 | 'product_id': fields.related('line_id', 'product_id', string='Product Code', readonly=True, |
728 | 743 | type='many2one', relation='product.product'), | 743 | type='many2one', relation='product.product'), |
729 | 744 | 'qty_ordered': fields.related('line_id', 'product_uom_qty', string='Ordered qty', readonly=True, related_uom='uom_id'), | 744 | 'qty_ordered': fields.related('line_id', 'product_uom_qty', string='Ordered qty', readonly=True, related_uom='uom_id'), |
730 | 745 | 'uom_id': fields.related('line_id', 'product_uom', type='many2one', relation='product.uom', string='UoM', readonly=True), | 745 | 'uom_id': fields.related('line_id', 'product_uom', type='many2one', relation='product.uom', string='UoM', readonly=True), |
731 | 746 | 746 | ||
732 | === modified file 'bin/addons/sourcing/sale_order_line.py' | |||
733 | --- bin/addons/sourcing/sale_order_line.py 2021-10-26 13:50:13 +0000 | |||
734 | +++ bin/addons/sourcing/sale_order_line.py 2022-06-24 14:44:08 +0000 | |||
735 | @@ -428,12 +428,7 @@ | |||
736 | 428 | return res | 428 | return res |
737 | 429 | 429 | ||
738 | 430 | _columns = { | 430 | _columns = { |
745 | 431 | 'customer': fields.related( | 431 | 'customer': fields.related('order_id', 'partner_id', string='Customer', readonly=True), |
740 | 432 | 'order_id', | ||
741 | 433 | 'partner_id', | ||
742 | 434 | string='Customer', | ||
743 | 435 | readonly=True, | ||
744 | 436 | ), | ||
746 | 437 | 'po_cft': fields.selection( | 432 | 'po_cft': fields.selection( |
747 | 438 | _SELECTION_PO_CFT, | 433 | _SELECTION_PO_CFT, |
748 | 439 | string="PO/CFT", | 434 | string="PO/CFT", |
749 | @@ -605,6 +600,7 @@ | |||
750 | 605 | size=64, | 600 | size=64, |
751 | 606 | string='Product code', | 601 | string='Product code', |
752 | 607 | store=False, | 602 | store=False, |
753 | 603 | write_relate=False, | ||
754 | 608 | ), | 604 | ), |
755 | 609 | 'product_name': fields.related( | 605 | 'product_name': fields.related( |
756 | 610 | 'product_id', | 606 | 'product_id', |
757 | @@ -613,6 +609,7 @@ | |||
758 | 613 | size=128, | 609 | size=128, |
759 | 614 | string='Product description', | 610 | string='Product description', |
760 | 615 | store=False, | 611 | store=False, |
761 | 612 | write_relate=False, | ||
762 | 616 | ), | 613 | ), |
763 | 617 | } | 614 | } |
764 | 618 | 615 | ||
765 | 619 | 616 | ||
766 | === modified file 'bin/addons/stock/stock_move.py' | |||
767 | --- bin/addons/stock/stock_move.py 2022-05-06 13:36:38 +0000 | |||
768 | +++ bin/addons/stock/stock_move.py 2022-06-24 14:44:08 +0000 | |||
769 | @@ -483,9 +483,9 @@ | |||
770 | 483 | 'price_unit': fields.float('Unit Price', digits_compute= dp.get_precision('Account'), help="Technical field used to record the product cost set by the user during a picking confirmation (when average price costing method is used)"), | 483 | 'price_unit': fields.float('Unit Price', digits_compute= dp.get_precision('Account'), help="Technical field used to record the product cost set by the user during a picking confirmation (when average price costing method is used)"), |
771 | 484 | 'price_currency_id': fields.many2one('res.currency', 'Currency for average price', help="Technical field used to record the currency chosen by the user during a picking confirmation (when average price costing method is used)"), | 484 | 'price_currency_id': fields.many2one('res.currency', 'Currency for average price', help="Technical field used to record the currency chosen by the user during a picking confirmation (when average price costing method is used)"), |
772 | 485 | 'company_id': fields.many2one('res.company', 'Company', required=True, select=True), | 485 | 'company_id': fields.many2one('res.company', 'Company', required=True, select=True), |
776 | 486 | 'partner_id': fields.related('picking_id','address_id','partner_id',type='many2one', relation="res.partner", string="Partner", store=True, select=True), | 486 | 'partner_id': fields.related('picking_id','address_id','partner_id',type='many2one', relation="res.partner", string="Partner", store=True, select=True, write_relate=False), |
777 | 487 | 'backorder_id': fields.related('picking_id','backorder_id',type='many2one', relation="stock.picking", string="Back Order", select=True), | 487 | 'backorder_id': fields.related('picking_id','backorder_id',type='many2one', relation="stock.picking", string="Back Order", select=True, write_relate=False), |
778 | 488 | 'origin': fields.related('picking_id','origin',type='char', size=512, relation="stock.picking", string="Origin", store=True), | 488 | 'origin': fields.related('picking_id','origin',type='char', size=512, relation="stock.picking", string="Origin", store=True, write_relate=False), |
779 | 489 | 489 | ||
780 | 490 | # used for colors in tree views: | 490 | # used for colors in tree views: |
781 | 491 | 'scrapped': fields.related('location_dest_id','scrap_location',type='boolean',relation='stock.location',string='Scrapped', readonly=True), | 491 | 'scrapped': fields.related('location_dest_id','scrap_location',type='boolean',relation='stock.location',string='Scrapped', readonly=True), |
782 | @@ -519,7 +519,7 @@ | |||
783 | 519 | ('unallocated', 'Unallocated'), | 519 | ('unallocated', 'Unallocated'), |
784 | 520 | ('mixed', 'Mixed')], string='Allocated setup', method=True, store=False), | 520 | ('mixed', 'Mixed')], string='Allocated setup', method=True, store=False), |
785 | 521 | 'purchase_line_id': fields.many2one('purchase.order.line', 'Purchase Order Line', ondelete='set null', select=True, readonly=True), | 521 | 'purchase_line_id': fields.many2one('purchase.order.line', 'Purchase Order Line', ondelete='set null', select=True, readonly=True), |
787 | 522 | 'picking_subtype': fields.related('picking_id', 'subtype', string='Picking Subtype', type='selection', selection=[('picking', 'Picking'),('ppl', 'PPL'),('packing', 'Packing')],), | 522 | 'picking_subtype': fields.related('picking_id', 'subtype', string='Picking Subtype', type='selection', selection=[('picking', 'Picking'),('ppl', 'PPL'),('packing', 'Packing')], write_relate=False), |
788 | 523 | 'parent_doc_id': fields.function(_get_parent_doc, method=True, type='char', string='Picking', readonly=True), | 523 | 'parent_doc_id': fields.function(_get_parent_doc, method=True, type='char', string='Picking', readonly=True), |
789 | 524 | 524 | ||
790 | 525 | 'order_priority': fields.function(_get_order_information, method=True, string='Priority', type='selection', | 525 | 'order_priority': fields.function(_get_order_information, method=True, string='Priority', type='selection', |
791 | 526 | 526 | ||
792 | === modified file 'bin/addons/stock_forecast/wizard/stock_forecast.py' | |||
793 | --- bin/addons/stock_forecast/wizard/stock_forecast.py 2021-07-07 16:30:21 +0000 | |||
794 | +++ bin/addons/stock_forecast/wizard/stock_forecast.py 2022-06-24 14:44:08 +0000 | |||
795 | @@ -638,8 +638,9 @@ | |||
796 | 638 | ('rfq_updated', 'Updated'), | 638 | ('rfq_updated', 'Updated'), |
797 | 639 | #('rfq_done', 'RfQ Done'), | 639 | #('rfq_done', 'RfQ Done'), |
798 | 640 | ] | 640 | ] |
801 | 641 | _columns = {'order_state': fields.related('order_id', 'state', string='Purchase Order State', type='selection', selection=STATE_SELECTION,), | 641 | _columns = { |
802 | 642 | } | 642 | 'order_state': fields.related('order_id', 'state', string='Purchase Order State', type='selection', selection=STATE_SELECTION, write_relate=False), |
803 | 643 | } | ||
804 | 643 | 644 | ||
805 | 644 | purchase_order_line() | 645 | purchase_order_line() |
806 | 645 | 646 | ||
807 | 646 | 647 | ||
808 | === modified file 'bin/addons/stock_override/report/report_stock_move.py' | |||
809 | --- bin/addons/stock_override/report/report_stock_move.py 2021-11-18 11:18:31 +0000 | |||
810 | +++ bin/addons/stock_override/report/report_stock_move.py 2022-06-24 14:44:08 +0000 | |||
811 | @@ -86,13 +86,13 @@ | |||
812 | 86 | 'comment': fields.char(size=128, string='Comment'), | 86 | 'comment': fields.char(size=128, string='Comment'), |
813 | 87 | 'prodlot_id': fields.many2one('stock.production.lot', 'Batch', states={'done': [('readonly', True)]}, help="Batch number is used to put a serial number on the production", select=True), | 87 | 'prodlot_id': fields.many2one('stock.production.lot', 'Batch', states={'done': [('readonly', True)]}, help="Batch number is used to put a serial number on the production", select=True), |
814 | 88 | 'tracking_id': fields.many2one('stock.tracking', 'Pack', select=True, states={'done': [('readonly', True)]}, help="Logistical shipping unit: pallet, box, pack ..."), | 88 | 'tracking_id': fields.many2one('stock.tracking', 'Pack', select=True, states={'done': [('readonly', True)]}, help="Logistical shipping unit: pallet, box, pack ..."), |
816 | 89 | 'origin': fields.related('picking_id', 'origin', type='char', size=512, relation="stock.picking", string="Origin", store=True), | 89 | 'origin': fields.related('picking_id', 'origin', type='char', size=512, relation="stock.picking", string="Origin", store=True, write_relate=False), |
817 | 90 | 'move': fields.many2one('stock.move', string='Move'), | 90 | 'move': fields.many2one('stock.move', string='Move'), |
818 | 91 | 'reason_type_id': fields.many2one('stock.reason.type', string='Reason type'), | 91 | 'reason_type_id': fields.many2one('stock.reason.type', string='Reason type'), |
819 | 92 | 'currency_id': fields.many2one('res.currency', string='Currency'), | 92 | 'currency_id': fields.many2one('res.currency', string='Currency'), |
823 | 93 | 'product_code': fields.related('product_id', 'default_code', type='char', string='Product Code'), | 93 | 'product_code': fields.related('product_id', 'default_code', type='char', string='Product Code', write_relate=False), |
824 | 94 | 'product_name': fields.related('product_id', 'name', type='char', string='Product Name'), | 94 | 'product_name': fields.related('product_id', 'name', type='char', string='Product Name', write_relate=False), |
825 | 95 | 'expiry_date': fields.related('prodlot_id', 'life_date', type='date', string='Expiry Date'), | 95 | 'expiry_date': fields.related('prodlot_id', 'life_date', type='date', string='Expiry Date', write_relate=False), |
826 | 96 | } | 96 | } |
827 | 97 | 97 | ||
828 | 98 | def init(self, cr): | 98 | def init(self, cr): |
829 | 99 | 99 | ||
830 | === modified file 'bin/addons/stock_override/stock.py' | |||
831 | --- bin/addons/stock_override/stock.py 2022-04-14 10:10:19 +0000 | |||
832 | +++ bin/addons/stock_override/stock.py 2022-06-24 14:44:08 +0000 | |||
833 | @@ -1130,9 +1130,9 @@ | |||
834 | 1130 | 'dpo_line_id': fields.integer(string='Direct PO line', help='PO line from where this stock move is sourced (for sync. engine).'), | 1130 | 'dpo_line_id': fields.integer(string='Direct PO line', help='PO line from where this stock move is sourced (for sync. engine).'), |
835 | 1131 | 'from_dpo': fields.function(_get_from_dpo, fnct_search=_search_from_dpo, type='boolean', method=True, store=False, string='From DPO ?'), | 1131 | 'from_dpo': fields.function(_get_from_dpo, fnct_search=_search_from_dpo, type='boolean', method=True, store=False, string='From DPO ?'), |
836 | 1132 | 'sync_dpo': fields.boolean(string='Sync. DPO'), | 1132 | 'sync_dpo': fields.boolean(string='Sync. DPO'), |
838 | 1133 | 'from_wkf_line': fields.related('picking_id', 'from_wkf', type='boolean', string='Internal use: from wkf'), | 1133 | 'from_wkf_line': fields.related('picking_id', 'from_wkf', type='boolean', string='Internal use: from wkf', write_relate=False), |
839 | 1134 | 'is_ext_cu': fields.related('picking_id', 'ext_cu', type='boolean', string='Ext. CU', write_relate=False), | 1134 | 'is_ext_cu': fields.related('picking_id', 'ext_cu', type='boolean', string='Ext. CU', write_relate=False), |
841 | 1135 | 'fake_state': fields.related('state', type='char', store=False, string="Internal use"), | 1135 | 'fake_state': fields.related('state', type='char', store=False, string="Internal use", write_relate=False), |
842 | 1136 | 'processed_stock_move': fields.boolean(string='Processed Stock Move'), | 1136 | 'processed_stock_move': fields.boolean(string='Processed Stock Move'), |
843 | 1137 | 'inactive_product': fields.function(_get_inactive_product, method=True, type='boolean', string='Product is inactive', store=False, multi='inactive'), | 1137 | 'inactive_product': fields.function(_get_inactive_product, method=True, type='boolean', string='Product is inactive', store=False, multi='inactive'), |
844 | 1138 | 'inactive_error': fields.function(_get_inactive_product, method=True, type='char', string='Error', store=False, multi='inactive'), | 1138 | 'inactive_error': fields.function(_get_inactive_product, method=True, type='char', string='Error', store=False, multi='inactive'), |
845 | @@ -1142,7 +1142,7 @@ | |||
846 | 1142 | 'expired_lot': fields.function(_is_expired_lot, method=True, type='boolean', string='Lot expired', store=False, multi='attribute'), | 1142 | 'expired_lot': fields.function(_is_expired_lot, method=True, type='boolean', string='Lot expired', store=False, multi='attribute'), |
847 | 1143 | 'product_tbd': fields.function(_is_expired_lot, method=True, type='boolean', string='TbD', store=False, multi='attribute'), | 1143 | 'product_tbd': fields.function(_is_expired_lot, method=True, type='boolean', string='TbD', store=False, multi='attribute'), |
848 | 1144 | 'has_to_be_resourced': fields.boolean(string='Has to be resourced'), | 1144 | 'has_to_be_resourced': fields.boolean(string='Has to be resourced'), |
850 | 1145 | 'from_wkf': fields.related('picking_id', 'from_wkf', type='boolean', string='From wkf'), | 1145 | 'from_wkf': fields.related('picking_id', 'from_wkf', type='boolean', string='From wkf', write_relate=False), |
851 | 1146 | 'price_changed': fields.function(_is_price_changed, method=True, type='boolean', string='Price changed', | 1146 | 'price_changed': fields.function(_is_price_changed, method=True, type='boolean', string='Price changed', |
852 | 1147 | store={ | 1147 | store={ |
853 | 1148 | 'stock.move': (lambda self, cr, uid, ids, c=None: ids, ['price_unit', 'purchase_order_line'], 10), | 1148 | 'stock.move': (lambda self, cr, uid, ids, c=None: ids, ['price_unit', 'purchase_order_line'], 10), |
854 | 1149 | 1149 | ||
855 | === modified file 'bin/addons/stock_override/wizard/stock_card_wizard.py' | |||
856 | --- bin/addons/stock_override/wizard/stock_card_wizard.py 2021-07-07 16:30:21 +0000 | |||
857 | +++ bin/addons/stock_override/wizard/stock_card_wizard.py 2022-06-24 14:44:08 +0000 | |||
858 | @@ -33,7 +33,7 @@ | |||
859 | 33 | 'product_id': fields.many2one('product.product', string='Product', | 33 | 'product_id': fields.many2one('product.product', string='Product', |
860 | 34 | required=True), | 34 | required=True), |
861 | 35 | 'uom_id': fields.related('product_id', 'uom_id', type='many2one', | 35 | 'uom_id': fields.related('product_id', 'uom_id', type='many2one', |
863 | 36 | relation='product.uom', string='UoM'), | 36 | relation='product.uom', string='UoM', write_relate=False), |
864 | 37 | 'perishable': fields.boolean(string='Perishable'), | 37 | 'perishable': fields.boolean(string='Perishable'), |
865 | 38 | 'prodlot_id': fields.many2one('stock.production.lot', | 38 | 'prodlot_id': fields.many2one('stock.production.lot', |
866 | 39 | string='Batch number'), | 39 | string='Batch number'), |
867 | 40 | 40 | ||
868 | === modified file 'bin/addons/supplier_catalogue/product.py' | |||
869 | --- bin/addons/supplier_catalogue/product.py 2021-07-07 16:30:21 +0000 | |||
870 | +++ bin/addons/supplier_catalogue/product.py 2022-06-24 14:44:08 +0000 | |||
871 | @@ -211,8 +211,8 @@ | |||
872 | 211 | help='The ordered quantity must be a multiple of this rounding value.', related_uom='uom_id'), | 211 | help='The ordered quantity must be a multiple of this rounding value.', related_uom='uom_id'), |
873 | 212 | 'min_order_qty': fields.float(digits=(16, 2), string='Min. Order Qty', related_uom='uom_id'), | 212 | 'min_order_qty': fields.float(digits=(16, 2), string='Min. Order Qty', related_uom='uom_id'), |
874 | 213 | 'valid_from': fields.date(string='Valid from'), | 213 | 'valid_from': fields.date(string='Valid from'), |
877 | 214 | 'partner_id': fields.related('suppinfo_id', 'name', string='Partner', type='many2one', relation='res.partner'), | 214 | 'partner_id': fields.related('suppinfo_id', 'name', string='Partner', type='many2one', relation='res.partner', write_relate=False), |
878 | 215 | 'product_id': fields.related('suppinfo_id', 'product_id', string='Product', type='many2one', relation='product.template'), | 215 | 'product_id': fields.related('suppinfo_id', 'product_id', string='Product', type='many2one', relation='product.template', write_relate=False), |
879 | 216 | 'sequence': fields.function(_get_sequence, method=True, string='Sequence', type='integer', | 216 | 'sequence': fields.function(_get_sequence, method=True, string='Sequence', type='integer', |
880 | 217 | store={'pricelist.partnerinfo': (lambda self, cr, uid, ids, c={}: ids, [], 20), | 217 | store={'pricelist.partnerinfo': (lambda self, cr, uid, ids, c={}: ids, [], 20), |
881 | 218 | 'product.supplierinfo': (_get_supplierinfo, ['sequence'], 20), | 218 | 'product.supplierinfo': (_get_supplierinfo, ['sequence'], 20), |
882 | 219 | 219 | ||
883 | === modified file 'bin/addons/tender_flow/tender_flow.py' | |||
884 | --- bin/addons/tender_flow/tender_flow.py 2022-03-21 12:41:58 +0000 | |||
885 | +++ bin/addons/tender_flow/tender_flow.py 2022-06-24 14:44:08 +0000 | |||
886 | @@ -136,7 +136,7 @@ | |||
887 | 136 | 'notes': fields.text('Notes'), | 136 | 'notes': fields.text('Notes'), |
888 | 137 | 'internal_state': fields.selection([('draft', 'Draft'), ('updated', 'Rfq Updated'), ], string="Internal State", readonly=True), | 137 | 'internal_state': fields.selection([('draft', 'Draft'), ('updated', 'Rfq Updated'), ], string="Internal State", readonly=True), |
889 | 138 | 'rfq_name_list': fields.function(_vals_get, method=True, string='RfQs Ref', type='char', readonly=True, store=False, multi='get_vals',), | 138 | 'rfq_name_list': fields.function(_vals_get, method=True, string='RfQs Ref', type='char', readonly=True, store=False, multi='get_vals',), |
891 | 139 | 'product_id': fields.related('tender_line_ids', 'product_id', type='many2one', relation='product.product', string='Product'), | 139 | 'product_id': fields.related('tender_line_ids', 'product_id', type='many2one', relation='product.product', string='Product', write_relate=False), |
892 | 140 | 'delivery_address': fields.many2one('res.partner.address', string='Delivery address', required=True), | 140 | 'delivery_address': fields.many2one('res.partner.address', string='Delivery address', required=True), |
893 | 141 | 'tender_from_fo': fields.function(_is_tender_from_fo, method=True, type='boolean', string='Is tender from FO ?',), | 141 | 'tender_from_fo': fields.function(_is_tender_from_fo, method=True, type='boolean', string='Is tender from FO ?',), |
894 | 142 | 'diff_nb_rfq_supplier': fields.function(_diff_nb_rfq_supplier, method=True, type="boolean", string="Compare the number of rfqs and the number of suppliers", store=False), | 142 | 'diff_nb_rfq_supplier': fields.function(_diff_nb_rfq_supplier, method=True, type="boolean", string="Compare the number of rfqs and the number of suppliers", store=False), |
895 | @@ -960,7 +960,7 @@ | |||
896 | 960 | 'purchase_order_line_id': fields.many2one('purchase.order.line', string="Related RfQ line", readonly=True), | 960 | 'purchase_order_line_id': fields.many2one('purchase.order.line', string="Related RfQ line", readonly=True), |
897 | 961 | 'sale_order_line_id': fields.many2one('sale.order.line', string="Sale Order Line"), | 961 | 'sale_order_line_id': fields.many2one('sale.order.line', string="Sale Order Line"), |
898 | 962 | 'product_uom': fields.many2one('product.uom', 'Product UOM', required=True), | 962 | 'product_uom': fields.many2one('product.uom', 'Product UOM', required=True), |
900 | 963 | 'date_planned': fields.related('tender_id', 'requested_date', type='date', string='Requested Date', store=False,), | 963 | 'date_planned': fields.related('tender_id', 'requested_date', type='date', string='Requested Date', store=False, write_relate=False), |
901 | 964 | # functions | 964 | # functions |
902 | 965 | 'supplier_id': fields.related('purchase_order_line_id', 'order_id', 'partner_id', type='many2one', relation='res.partner', string="Supplier", readonly=True), | 965 | 'supplier_id': fields.related('purchase_order_line_id', 'order_id', 'partner_id', type='many2one', relation='res.partner', string="Supplier", readonly=True), |
903 | 966 | 'price_unit': fields.related('purchase_order_line_id', 'price_unit', type="float", string="Price unit", digits_compute=dp.get_precision('Purchase Price Computation'), readonly=True), # same precision as related field! | 966 | 'price_unit': fields.related('purchase_order_line_id', 'price_unit', type="float", string="Price unit", digits_compute=dp.get_precision('Purchase Price Computation'), readonly=True), # same precision as related field! |
904 | @@ -969,7 +969,7 @@ | |||
905 | 969 | 'currency_id': fields.function(_get_total_price, method=True, type='many2one', relation='res.currency', string='Cur.', multi='total'), | 969 | 'currency_id': fields.function(_get_total_price, method=True, type='many2one', relation='res.currency', string='Cur.', multi='total'), |
906 | 970 | 'purchase_order_id': fields.related('purchase_order_line_id', 'order_id', type='many2one', relation='purchase.order', string="Related RfQ", readonly=True,), | 970 | 'purchase_order_id': fields.related('purchase_order_line_id', 'order_id', type='many2one', relation='purchase.order', string="Related RfQ", readonly=True,), |
907 | 971 | 'purchase_order_line_number': fields.related('purchase_order_line_id', 'line_number', type="char", string="Related Line Number", readonly=True,), | 971 | 'purchase_order_line_number': fields.related('purchase_order_line_id', 'line_number', type="char", string="Related Line Number", readonly=True,), |
909 | 972 | 'state': fields.related('tender_id', 'state', type="selection", selection=_SELECTION_TENDER_STATE, string="State",), | 972 | 'state': fields.related('tender_id', 'state', type="selection", selection=_SELECTION_TENDER_STATE, string="State", write_relate=False), |
910 | 973 | 'line_state': fields.selection([('draft', 'Draft'), ('cancel', 'Cancelled'), ('cancel_r', 'Cancelled-r'), ('done', 'Done')], string='State', readonly=True), | 973 | 'line_state': fields.selection([('draft', 'Draft'), ('cancel', 'Cancelled'), ('cancel_r', 'Cancelled-r'), ('done', 'Done')], string='State', readonly=True), |
911 | 974 | 'comment': fields.char(size=128, string='Comment'), | 974 | 'comment': fields.char(size=128, string='Comment'), |
912 | 975 | 'has_to_be_resourced': fields.boolean(string='Has to be resourced'), | 975 | 'has_to_be_resourced': fields.boolean(string='Has to be resourced'), |
913 | @@ -1663,9 +1663,9 @@ | |||
914 | 1663 | 1663 | ||
915 | 1664 | return res | 1664 | return res |
916 | 1665 | 1665 | ||
918 | 1666 | _columns = {'tender_id': fields.related('order_id', 'tender_id', type='many2one', relation='tender', string='Tender',), | 1666 | _columns = {'tender_id': fields.related('order_id', 'tender_id', type='many2one', relation='tender', string='Tender', write_relate=False), |
919 | 1667 | 'tender_line_id': fields.many2one('tender.line', string='Tender Line'), | 1667 | 'tender_line_id': fields.many2one('tender.line', string='Tender Line'), |
921 | 1668 | 'rfq_ok': fields.related('order_id', 'rfq_ok', type='boolean', string='RfQ ?'), | 1668 | 'rfq_ok': fields.related('order_id', 'rfq_ok', type='boolean', string='RfQ ?', write_relate=False), |
922 | 1669 | 'sale_order_line_id': fields.many2one('sale.order.line', string='FO line', readonly=True), | 1669 | 'sale_order_line_id': fields.many2one('sale.order.line', string='FO line', readonly=True), |
923 | 1670 | 'rfq_line_state_to_display': fields.function(_get_rfq_line_state_to_display, string='State', | 1670 | 'rfq_line_state_to_display': fields.function(_get_rfq_line_state_to_display, string='State', |
924 | 1671 | type='selection', selection=RFQ_LINE_STATE_DISPLAY_SELECTION, | 1671 | type='selection', selection=RFQ_LINE_STATE_DISPLAY_SELECTION, |
925 | @@ -1960,6 +1960,7 @@ | |||
926 | 1960 | string='Tender', | 1960 | string='Tender', |
927 | 1961 | type='many2one', | 1961 | type='many2one', |
928 | 1962 | relation='tender', | 1962 | relation='tender', |
929 | 1963 | write_relate=False, | ||
930 | 1963 | ), | 1964 | ), |
931 | 1964 | } | 1965 | } |
932 | 1965 | 1966 | ||
933 | 1966 | 1967 | ||
934 | === modified file 'bin/osv/fields.py' | |||
935 | --- bin/osv/fields.py 2022-05-20 08:27:44 +0000 | |||
936 | +++ bin/osv/fields.py 2022-06-24 14:44:08 +0000 | |||
937 | @@ -1020,11 +1020,18 @@ | |||
938 | 1020 | def __init__(self, *arg, **args): | 1020 | def __init__(self, *arg, **args): |
939 | 1021 | self.arg = arg | 1021 | self.arg = arg |
940 | 1022 | self._relations = [] | 1022 | self._relations = [] |
944 | 1023 | write_fnct = self._fnct_write | 1023 | write_fnct = None |
945 | 1024 | if not args.get('write_relate', True): | 1024 | if args.get('write_relate', False): |
946 | 1025 | write_fnct = None | 1025 | write_fnct = self._fnct_write |
947 | 1026 | 1026 | ||
948 | 1027 | super(related, self).__init__(self._fnct_read, arg, write_fnct, fnct_inv_arg=arg, method=True, fnct_search=self._fnct_search, **args) | 1027 | super(related, self).__init__(self._fnct_read, arg, write_fnct, fnct_inv_arg=arg, method=True, fnct_search=self._fnct_search, **args) |
949 | 1028 | |||
950 | 1029 | if not write_fnct and args.get('store'): | ||
951 | 1030 | # example on account.move, partner_id fields.related store=True | ||
952 | 1031 | # is set as hidden in form view | ||
953 | 1032 | # without this the value s not cleaned by the web, and empty partner_id is written as '' instead of False | ||
954 | 1033 | self.readonly = args.get('readonly') | ||
955 | 1034 | |||
956 | 1028 | if self.store is True: | 1035 | if self.store is True: |
957 | 1029 | # TODO: improve here to change self.store = {...} according to related objects | 1036 | # TODO: improve here to change self.store = {...} according to related objects |
958 | 1030 | pass | 1037 | pass |